- Install NodeJS, for example, D:\nodeJS
- Add D:\nodeJS\bin to PATH variable
- Create npm folder in C:\Users\<user name>\AppData\Roaming\
- Add C:\Users\<user name>\AppData\Roaming\npm to PATH variable
- Go to http://git-scm.com/download/win to download git execute and install Git
- Install yeoman, grunt, grunt-cli, bower and jhipster generator
- npm install -g yo
- npm install -g grunt
- npm install -g grunt-cli
- npm install -g bower
- npm install -g generator-jhipster
- Install at least Maven 3.2.x in machine. http://maven.apache.org/download.cgi and download the latest version of Maven
- Use yeoman to scaffold jhipster project
- Create a main folder, for example, d:\project
- cd project and run yo jhipster
- Answer questions and wait for the boilerplate codes to be ready.
- Since my workplace uses Java 6, java.version has to be updated in pom.xml
- Open pom.xml and update the value of <java.version> from 1.7 to 1.6
- Add <tomcat.version>7.0.56</tomcat.version> so spring-starter-tomcat uses tomcat 7 instead of tomcat 8.
- Open GruntFile.js and change ip address from 0.0.0.0 to 127.0.0.1; otherwise, home page cannot show in grunt server
- Deploy project to grunt server
- Open command prompt
- Type cd d:\project\<app name> to change directory
- Type grunt server in command line
- If grunt task runs successfully, home page is loaded into browser and Url should be http://localhost:9000
- Deploy Spring Boot application
- Open another command prompt
- cd d:\project\<app name>
- Type mvn spring-boot:run to run application
- Type http://localhost:8080 and the same home page is served by tomcat 7
References:
- http://jhipster.github.io/installation.html
- http://jhipster.github.io/installation.html
- http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-use-tomcat-7