Skip to content

Multi-module maven project example using SPRING 4 and java 1.8 features

Notifications You must be signed in to change notification settings

cristianprofile/maven-masterclass

Repository files navigation

Spring Maven Java 1.8

Multi-module maven project example using SPRING 4 and java 1.8

  • Spring boot module, use Spring without xml and Spring boot actuactor (admin services deployed)
  • Simple web app spring mvc using services
  • Rest Service implementation example with repository and mail access
  • Repository access with spring data jpa
  • Unitary and Integration test concept using hsldb and mockito (http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html)

NEW SPRING BOOT MVC APP CREATED, ENJOY IT

run spring-boot-mvc-web-example module with maven "mvn spring-boot:run" and access to http://localhost:9090/pizza and user: "admin@ole.com" and password "admin@ole.com".You can create other users with ROLE_USER at add user left menu option.

  • Spring boot MVC with Spring Security Access
  • I18n
  • Responsive Bootstrap css witn Tiles 3
  • Password encoding with Bcrypt BCRYPT password encoding

To test web mvc app type: mvn install jetty:run or sort command mvn deploy (jetty:run goal is linked to maven deploy phase)

If you want to access to Rest Service example api then you need to type this url:


If you want to access to Rest Service with Spring boot module "spring-boot-mvc" first run mvn spring-boot:run:

When you run Spring boot app Spring actuator add features to monitore your services:

  • http://localhost:9091/metrics (Spring Boot Actuator includes a metrics service with “gauge” and “counter” support. A “gauge” records a single value; and a “counter” records a delta (an increment or decrement). Metrics for all HTTP requests are automatically recorded, so if you hit the metrics endpoint should see a sensible response.)
  • http://localhost:9091/health (you can check if your app is available)
  • http://localhost:9091/mappings (list of your app HTTP endpoints)

More info about Spring Actuator at: Spring Actuator

You can access ppt at:

Cristian Romero Matesanz WUL4 #Training Thursday3 - Maven Presentation ppt


Note 1: If you want to use spring profiles you can use maven enviroment variable like this:

-Dspring.profiles.active="profile1,profile2"

New features coming soon!!!!!Spring boot refactor code without xml config 2015!!!!

About

Multi-module maven project example using SPRING 4 and java 1.8 features

Resources

Stars

Watchers

Forks

Packages

No packages published