jhipster/generator-jhipster — pull request #94 by jmirc (2013-12-28 04:58:25+00:00)
Title: generator-jhipster-80 Migrate to Spring Boot

This is my PR for christmas. I hope you will enjoy it.

This PR is huge and I did some changes to be able to integrate springboot. Here are the following major changes:

- The DispatcherServer is registered by default using the mapping /*. I added /app to each resource because I was not able to register the servlet as /app.

- Grunt has been update to publish the minimize css and minimize javascript to /dist instead of /src/main/webapp/dist. I did this change to remove the staticResourcesProductionFilter class. I found managing two different folders for dev and for prod was too complicated.

- The pom.xml file has been updated to include all springboot dependencies and two new plugins, which are the maven-clean-plugin and the maven-war-plugin. The maven-clean-plugin is called in the prod profile to clean some folder before packaging the war. The maven-war-plugin is called to include the new /dist folder.

- H2 is used for the testing. I decided to change the db driver to H2 after moving the JDBC dependencies outside the profile

- Remove all xml files (web.xml, ehcache.xml)

- Replace the .properties by .yml

Based on the current documentation, the following pages needs to be updated:

Usage in development -
2. Using Maven
Replace - mvn tomcat7:run by spring-boot:run

7.1. On the server side (Java/Spring)
No more mvn jetty:run-forked to use Spring Loaded. We just need to add -javaagent:spring_loaded/springloaded-1.1.4.jar -noverify in the JVM Option

Usage in production
Actually the database dependencies are defined within each profile. So when the war is generated only the dev or the production JDBC dependency is added. So I moved the JDBC dependencies (dev and prod) outside the profile. Now, we are able to run the war using the dev or the prod profile.

java -jar jhipster-0.1-SNAPSHOT.war

Or in "production" mode:
java -jar jhipster-0.1-SNAPSHOT.war --spring.profiles.active=prod