Skeleton: Gradle + Spring Boot + Angular2
Template project for projects using a Spring Boot backend, an Angular 2 frontend and a gradle build system.
Components
api
Java definition of the HTTP API. The code is annotated with Swagger documentation in order to allow automatic generation of the API client code.
backend
Spring Boot server backend, implementing the API.
frontend
Angular 2 frontend, using the API.
Usage
This project has development and production build modes.
Production build
gradlew build
Development build
You need an instance of the User Activity Manager running. For launching it please refer to its own readme.
Proxy Container
For the IAS to boot you need at least a simple jwilder nginx proxy container. Furthermore you need to be part of a swarm. Run the following commands:
docker swarm init
docker run -d --name ias-proxy \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
--label "com.docker.swarm.service.name=ias_ias-apps" \
--label "com.docker.stack.namespace=ias" \
jwilder/nginx-proxy:alpine
TODO describe more advanced setup which makes also the ias-apps work.
Backend
Then start the server by running cc.catalysts.Application in your IDE. The app will be accessible at http://localhost:8080/catalysts/.
Frontend
Do a production build and then in a terminal run:
cd frontend
npm run gulp -- watch
This will build in development mode and then watch the TypeScript, styles and templates, rebuilding on changes.
Authentication
For mocking authentication use an HTTP header spoofer addon like ModHeader. Set the variables which are defined in the config under app.sso to whatever you like.