Minor cleanup
This commit is contained in:
parent
9175393baa
commit
fe849c8a59
4 changed files with 21 additions and 13 deletions
1
.idea/libraries/bld.xml
generated
1
.idea/libraries/bld.xml
generated
|
@ -6,6 +6,7 @@
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC />
|
<JAVADOC />
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
|
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||||
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
<root url="jar://$USER_HOME$/.bld/dist/bld-1.7.5-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
<excluded>
|
<excluded>
|
||||||
|
|
20
README.md
20
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
|
[guide](https://spring.io/guides/gs/spring-boot/) for a sampling of how Spring Boot can help
|
||||||
you accelerate application development
|
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:
|
To access the web application, issue the follow command:
|
||||||
|
@ -28,7 +36,7 @@ curl -X POST localhost:8080/actuator/shutdown
|
||||||
|
|
||||||
## Testing the Application
|
## 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
|
./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:
|
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
|
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:
|
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
|
java -jar build/dist/demoapplication-0.1.0-boot.war
|
||||||
```
|
```
|
||||||
|
|
|
@ -29,8 +29,8 @@ public class ApplicationBuild extends WebProject {
|
||||||
.include(dependency("org.springframework.boot:spring-boot-starter-web:3.1.5"));
|
.include(dependency("org.springframework.boot:spring-boot-starter-web:3.1.5"));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.springframework.boot:spring-boot-starter-test:3.1.5"))
|
.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.jupiter:junit-jupiter:5.10.1"))
|
||||||
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.0"));
|
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.1"));
|
||||||
scope(standalone)
|
scope(standalone)
|
||||||
.include(dependency("org.springframework.boot:spring-boot-loader:3.1.5"));
|
.include(dependency("org.springframework.boot:spring-boot-loader:3.1.5"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -13,13 +12,13 @@ public class HelloControllerIT {
|
||||||
@Autowired
|
@Autowired
|
||||||
private TestRestTemplate template;
|
private TestRestTemplate template;
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) {
|
||||||
new HelloControllerIT().getHello();
|
new HelloControllerIT().getHello();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getHello() throws Exception {
|
public void getHello() {
|
||||||
ResponseEntity<String> response = template.getForEntity("/", String.class);
|
var response = template.getForEntity("/", String.class);
|
||||||
assertThat(response.getBody()).isEqualTo("Greetings from Spring Boot!");
|
assertThat(response.getBody()).isEqualTo("Greetings from Spring Boot!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue