Skip to content

RoyBoerner/springdemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot 2.0 Demo

This is my little playground application. It demonstrates the following features.

  1. What do we have out of the box?
    1. very quick project start-up (via start.spring.io)
    2. ready to use parent POMs
    3. Maven plug-in produces runnable fat JAR
    4. embedded servlet engine
    5. serving static content
      1. supporting webjars for Bootstrap, jQuery & Co
  2. REST
  3. Configuration
    1. ready to use configuration chain (see Setting Properties below)
    2. type save config
  4. Metrics & Monitoring via Actuator
    1. including an own health indicator
    2. including an own metric (counter)
    3. app info (Git commit id)
  5. JPA, using
    1. an opinionated in-memory DB H2 setup
    2. auto generated repositories
    3. transactions
  6. Testing
  7. Caching
  8. Task scheduling
  9. Application events
    1. Async feature
  10. JMS messaging

Some Notes

This demo uses Project Lombok data classes to reduce boiler plate code.

Build and Run

$ mvn package
$ java -jar target/springdemo-0.0.1-SNAPSHOT.jar
$ open 'http://localhost:8080'

Setting Properties

A Spring Boot application comes with a ready to use configuration chain. So you may set properties via Java system properties.

$ java -Dserver.port=8081 -Dspring.cache.type=none -jar target/springdemo-0.0.1-SNAPSHOT.jar 

... or via OS Environment.

$ export SERVER_PORT=8081
$ export SPRING_CACHE_TYPE=none
$ java -jar target/springdemo-0.0.1-SNAPSHOT.jar 

... or via application properties

$ java -jar target/springdemo-0.0.1-SNAPSHOT.jar --server.port=8081 --spring.cache.type=none 

... and of course via config file...

Documentation Links

Spring vs EJB

Some Slides

About

Playing around with spring boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published