Skip to content

lucmantovani/bootcamp-w1-g7-mlb-frescos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bootcamp-w1-g7-mlb-frescos

Spring Boot App model for Java 11

We provide a basic model for JDK 11 / Spring based web applications

Please address any questions and comments to Fury Issue Tracker.

Usage

SCOPE

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

Web Server

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.

Main

The main class for this app is Application, where Spring context is initialized and SCOPE_SUFFIX is generated.

Error Handling

We also provide basic handling for exceptions in ControllerExceptionHandler class.

Api Documentation

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.

Usage

  1. Specify the correct tag for your app in your Dockerfile and Dockerfile.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

  1. Start coding!

Questions

Release Process Issue Tracker

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •