Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 0fc19c7d authored by Arthur BOUDREAULT's avatar Arthur BOUDREAULT
Browse files

fix: fix java lint errors

parent 862c5915
No related branches found
No related tags found
No related merge requests found
Pipeline #38586 failed
......@@ -5,13 +5,24 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* Controller for handling greeting requests.
*/
@Controller
public class GreetingController {
@GetMapping("/greeting")
public String greeting(@RequestParam(name="name", required=false, defaultValue="World") String name, Model model) {
model.addAttribute("name", name);
return "greeting";
}
/**
* Handles requests to the /greeting endpoint.
*
* @param name the name of the person to greet
* @param model the model to add attributes to
* @return the name of the view to render
*/
@GetMapping("/greeting")
public String greeting(
@RequestParam(name = "name", required = false, defaultValue = "World")
final String name, final Model model) {
model.addAttribute("name", name);
return "greeting";
}
}
......@@ -2,13 +2,26 @@ package com.example.servingwebcontent;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* Main application class for serving web content.
*/
@SpringBootApplication
public class ServingWebContentApplication {
public final class ServingWebContentApplication {
public static void main(String[] args) {
SpringApplication.run(ServingWebContentApplication.class, args);
/**
* Private constructor to prevent instantiation.
*/
private ServingWebContentApplication() {
throw new UnsupportedOperationException();
}
/**
* Main method to start the Spring Boot application.
*
* @param args command-line arguments
*/
public static void main(final String[] args) {
SpringApplication.run(ServingWebContentApplication.class, args);
}
}
/**
* This package contains the main classes for the Serving Web Content
* application.
*/
package com.example.servingwebcontent;
server.servlet.context-path=/java-spring-boot
\ No newline at end of file
server.servlet.context-path=/java-spring-boot
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment