diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml index cf75013..ca84ff0 100644 --- a/.idea/libraries/bld.xml +++ b/.idea/libraries/bld.xml @@ -6,6 +6,7 @@ + @@ -14,4 +15,4 @@ - \ No newline at end of file + diff --git a/README.md b/README.md index b8e9799..d603ac3 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,20 @@ Based on the Spring Guides' Spring Boot web application example. Please be sure [guide](https://spring.io/guides/gs/spring-boot/) for a sampling of how Spring Boot can help you accelerate application development -## Running the Application +## Compile the Application -To run the web application, issue the following command: +To compile the web application, issue the following command: ``` -./bld compile run +./bld compile +``` + +## Running the Application + +To run the compiled web application, issue the following command: + +``` +./bld run ``` To access the web application, issue the follow command: @@ -28,7 +36,7 @@ curl -X POST localhost:8080/actuator/shutdown ## Testing the Application -To run the web application tests, issue the following command: +To run the compiled web application tests, issue the following command: ``` ./bld test @@ -39,7 +47,7 @@ To run the web application tests, issue the following command: To build and launch the executable JAR, issue the following commands: ``` -./bld bootjar +./bld compile bootjar java -jar build/dist/demoapplication-0.1.0-boot.jar ``` @@ -48,6 +56,6 @@ java -jar build/dist/demoapplication-0.1.0-boot.jar To build and launch the executable WAR, issue the following commands: ``` -./bld bootwar +./bld compile bootwar java -jar build/dist/demoapplication-0.1.0-boot.war ``` diff --git a/src/bld/java/com/example/springboot/ApplicationBuild.java b/src/bld/java/com/example/springboot/ApplicationBuild.java index f20104a..e44389a 100644 --- a/src/bld/java/com/example/springboot/ApplicationBuild.java +++ b/src/bld/java/com/example/springboot/ApplicationBuild.java @@ -29,8 +29,8 @@ public class ApplicationBuild extends WebProject { .include(dependency("org.springframework.boot:spring-boot-starter-web:3.1.5")); scope(test) .include(dependency("org.springframework.boot:spring-boot-starter-test:3.1.5")) - .include(dependency("org.junit.jupiter:junit-jupiter:5.10.0")) - .include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.0")); + .include(dependency("org.junit.jupiter:junit-jupiter:5.10.1")) + .include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.1")); scope(standalone) .include(dependency("org.springframework.boot:spring-boot-loader:3.1.5")); } diff --git a/src/test/java/com/example/springboot/HelloControllerIT.java b/src/test/java/com/example/springboot/HelloControllerIT.java index 0d3ea5c..34f333f 100644 --- a/src/test/java/com/example/springboot/HelloControllerIT.java +++ b/src/test/java/com/example/springboot/HelloControllerIT.java @@ -4,7 +4,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.http.ResponseEntity; import static org.assertj.core.api.Assertions.assertThat; @@ -13,13 +12,13 @@ public class HelloControllerIT { @Autowired private TestRestTemplate template; - public static void main(String[] args) throws Exception { + public static void main(String[] args) { new HelloControllerIT().getHello(); } @Test - public void getHello() throws Exception { - ResponseEntity response = template.getForEntity("/", String.class); + public void getHello() { + var response = template.getForEntity("/", String.class); assertThat(response.getBody()).isEqualTo("Greetings from Spring Boot!"); } }