Tested on ubuntu with
- Maven version 8.3.6
- Java version 18
- MySql version 8.0.30
- Npm version 8.11.0
-
Create schema city in MySql db.
-
Set username and password in file liquibase/src/main/resources/liquibase.properties. The user should have a grant to create tables. Modify the url to the MySql server if needed.
-
Run maven command with profile liquibase to create db structures and fill the data.
mvn install -P liquibase
-
Set spring.datasource.username and spring.datasource.password in file backend/src/main/resources/application.properties. The user should have a grant to select/update data in the table in city schema. Modify the url to the MySql server if needed.
-
Run maven command with default profile to build application
mvn install -P default
-
Copy war file from /backend/target/ directory to the web server. Application base path is /city-list. On tomcat the application URL should be http://localhost:8080/city-list/index.html
Start backend spring boot application
cd /backend
mvn spring-boot:run
Spring boot application is running on the port 9040
Start frontend Angular
cd /frontend
ng serve
Frontend angular is running on the port 4200 with configured proxy to backend port 9040
Run angular tests
cd /frontend
ng test
Two users created
- user with password user ( role USER )
- editor with password editor ( roles USER and EDITOR )