We provide a basic model for JDK 11 / Spring based web applications
Please address any questions and comments to Fury Issue Tracker.
The suffix of each Fury SCOPE is used to know which properties file to use, it is identified from the last '-' of the name of the scope.
If you want to run the application from your development IDE, you need to configure the environment variable SCOPE=local in the app luncher.
The properties of application.yml are always loaded and at the same time they are complemented with application-<SCOPE_SUFFIX>.yml properties. If a property is in both files, the one that is configured in application-<SCOPE_SUFFIX>.yml has preference over the property of application.yml.
For example, for the SCOPE 'items-loader-test' the SCOPE_SUFFIX would be 'test' and the loaded property files will be application.yml and application-test.yml
Each Spring Boot web application includes an embedded web server. For servlet stack applications, Its supports three web Servers:
- Tomcat (maven dependency:
spring-boot-starter-tomcat
) - Jetty (maven dependency:
spring-boot-starter-jetty
) - Undertow (maven dependency:
spring-boot-starter-undertow
)
This project is configured with Jetty, but to exchange WebServer, it is enough to configure the dependencies mentioned above in the pom.xml file.
The main class for this app is Application, where Spring context is initialized and SCOPE_SUFFIX is generated.
We also provide basic handling for exceptions in ControllerExceptionHandler class.
This project uses Springfox to automate the generation of machine and human readable specifications for JSON APIs written using Spring. Springfox works by examining an application, once, at runtime to infer API semantics based on spring configurations, class structure and various compile time java Annotations.
You can change this configuration in SpringfoxConfig class.
- Specify the correct tag for your app in your
Dockerfile
andDockerfile.runtime
, according to the desired Java runtime version.
# Dockerfile
FROM hub.furycloud.io/mercadolibre/java:1.11-mini
You can find all available tags for your Dockerfile
here
# Dockerfile.runtime
FROM hub.furycloud.io/mercadolibre/java:1.11-runtime-mini
You can find all available tags for your Dockerfile.runtime
here
- Start coding!