Demonstrating Moviee
When everything is put together, built, and run, the Retro board can be accessed using the http://<host>:<port>
URL.
There are several ways to run a Spring Boot application; some of them are mentioned in the following list:
- Running the Spring Boot application main class using an IDE.
- Building a JAR or WAR file using the following Maven command and then running it:
$ mvn clean install $ java -jar target/<package-name>.[jar|war]
- Running the Spring Boot application using the Spring Boot Maven plugin:
$ mvn clean spring-boot:run
Integration testing
To verify the everything works as expected in a real world scenario, an integration test can be written that, which puts everything together and tests each endpoint. The following is an integration test for the Moviee web service:
@RunWith(SpringRunner::class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) class SpringBoot2MovieRatingApplicationTests { @Autowired lateinit var webTestClient...