Spring Boot Server
This server was generated by the OpenAPI Generator project. By using the OpenAPI-Spec, you can easily generate a server stub. This is an example of building a OpenAPI-enabled server in Java using the SpringBoot framework.
The underlying library integrating OpenAPI to SpringBoot is springfox
Start your postgres database using provided docker-compose file:
docker-compose -f deployment/docker-compose/postgres.yaml up -dStart your server as a simple java application:
mvn spring-boot:runYou can view the api documentation in swagger-ui by pointing to
http://localhost:8080/
Change default port value in application.properties
To run the server on a Docker container, please execute the following from the root directory:
# Build application
mvn clean package -Dmaven.test.skip
# Extract the FAT jar
mkdir target/docker-packaging && (cd target/docker-packaging; jar -xf ../*.jar)# building the image
docker build -t bookservice .
# starting up a container
docker run -p 8080:8080 bookserviceand open your browser to here:
http://localhost:8080/