diff --git a/README.md b/README.md new file mode 100644 index 0000000..b69cb3c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# springboot-ex diff --git a/src/main/java/com/example/demo/DemoApplication.java b/src/main/java/com/example/demo/DemoApplication.java index 8a2ad5e..9048854 100644 --- a/src/main/java/com/example/demo/DemoApplication.java +++ b/src/main/java/com/example/demo/DemoApplication.java @@ -1,5 +1,6 @@ package com.example.demo; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.RequestMapping; @@ -10,13 +11,16 @@ @SpringBootApplication public class DemoApplication { + @Value("${APP_TITLE}") + private String title; + @RequestMapping("/") String home() { - return "Hello World!"; + return String.format("title: %s message: %s",title, "Hello World! test da luciano grippa modificato il 23/11/2021 ore 11:22 modifica da branch luciano"); } public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } -} \ No newline at end of file +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8b13789..da7c6b3 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1 @@ - +APP_TITLE=${APP_TILE:test in ide} \ No newline at end of file