(Java Spring + AngularJS)/Tomcat app generator for Yeoman
I realized I usually spend more time removing all the unecessary libraries and extra stuff when I use existing generators, so here is a lightweight and clean generator to bootstrap a project which doesn't require lunar load balancing, 64 clustered oracle instances and 782 hadoop nodes (you can add that yourself afterwards!).
angular-spring generator is a Yeoman generator which create a solid base project using Java Spring MVC & AngularJS and can be quickly deployed on Tomcat. The following tools will be included Maven, Grunt & Bower.
IF YOU WISH, the generator can add extra stuff like: FontAwesome and AngularStrap. (@TODO: Compass, WebSocket)
The AngularJS style is based on @john_papa style guide
If you do not have Yeoman on your computer, please install it first using the command below:
npm install -g yo
To install the generator you can use npm
npm install -g generator-angular-spring
You can also clone the project and link it to your local npm
git clone https://github.com/madtrax/generator-angular-spring.git && cd ./generator-angular-spring && sudo npm link
Finally, launch the generator:
yo angular-spring
Once you ran the generator, execute the following commands to compile and run the web application.
Install dependencies:
npm install && bower install
Start:
grunt && mvn tomcat7:run
Once everything is done you can open you web browser: http://localhost:8080/your-project-name/
You can find a sample of generated application here.
The application folder structure before running grunt and bower should be:
├── Gruntfile.js
├── README.md
├── bower.json
├── package.json
├── pom.xml
└── src
└── main
├── java
│ └── com
│ └── mycompany
│ └── myapp
│ ├── controller
│ │ └── ApplicationController.java
│ └── service
│ └── ApplicationService.java
├── resources
│ ├── log4j2.xml
│ └── spring
│ ├── application-config.xml
│ └── mvc-config.xml
└── webapp
├── app
│ ├── app.js
│ ├── components
│ │ ├── core
│ │ │ └── directives
│ │ │ └── directives.js
│ │ └── main
│ │ ├── controllers
│ │ │ └── main.js
│ │ └── services
│ │ └── main.js
│ ├── config.js
│ └── routes.js
├── config
│ └── config.properties
├── index.html
├── style
│ └── style.css
├── templates
│ ├── header.html
│ └── main
│ └── main.html
└── web.xml
22 directories, 22 files
There is many improvements that can be done for this project, feel free to contribute.
Apache 2.0