Produce a simple web-app to do a CRUD operation.
Create a Java-based REST API that:
- Creates a new company.
- Get a list of all the companies.
- Get detail about a company.
- Ability to update the company details.
- Able to add beneficial owner(s) of the company.
Create a UI which will use those rest endpoint and would be used to interact with the user.
- Install Java8 using the instruction mentioned https://www.ntu.edu.sg/home/ehchua/programming/howto/JDK_HowTo.html
- Install Maven using the instruction mentioned https://maven.apache.org/install.html
- Install Git using https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
- Clone the repository using "git clone https://github.com/eralmas7/SpringBootWithAngular.git" command.
- After cloning, goto the directory SpringBootWithAngular where we checked out the project.
- Once done, you could create executable jar using "mvn package"
- Once done, you should be able to run the application using "java -jar target/*.jar"
1. Based on SOLID design principle.
2. Monitoring is available https://samplecompany.herokuapp.com/health
3. Added JBheave acceptance test, Integration test, unit tests.
4. Uses Spring data to perform CRUD operations.
1. Add the following dependancy in pom.xml (under dependancies tag) which is at the root of the Git project.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
2. Add the security config similar to one created by me https://github.com/eralmas7/Currency-Coverter-app/blob/master/src/main/java/com/currency/converter/client/config/SecurityConfig.java
3. Add initial sql script which would create a user in resources folder like https://github.com/eralmas7/Currency-Coverter-app/blob/master/src/main/resources/data.sql
4. Create a domain class for user like https://github.com/eralmas7/Currency-Coverter-app/blob/master/src/main/java/com/currency/converter/domain/User.java
5. Handle login/logout functionality as created by me https://github.com/eralmas7/Currency-Coverter-app/blob/master/src/main/webapp/WEB-INF/ftl/home.ftl
1. Since this application depends on inmemory database to store the state, we should move to mysql which would be a common data source.
2. We should be behind the load balancer or router (like apache camel router/redirector or zookeper) to route the request from centralized location to appropriate service instances.
1. Companies are just present at one location and have one contact information.
1. Java 8
2. Spring Boot framework
3. Spring Data
4. JBehave, Junit, Mockito, Spring-Test
5. H2
6. Tomcat
7. Maven
1. Bootstrap
2. Angular JS
3. Html 5
- Cloud - https://samplecompany.herokuapp.com
- CI - https://travis-ci.org/eralmas7/SpringBootWithAngular