Skip to content

Latest commit

 

History

History
124 lines (80 loc) · 2.7 KB

README.md

File metadata and controls

124 lines (80 loc) · 2.7 KB

cmltemplate

Unit Tests

Use this template as a base for your Spring Boot app @ CML

Versions

Spring Boot Java MySQL Postgres
3.x 17 8 13

Run

bash -c "$(curl -sSL "https://github.com/raw/CMLTeam/cmltemplate/master/init.sh?token=$(date +%T)")"

and follow instructions.

The project folder with scaffolded code will be created in current folder.

Analyze with CML SonarQube instance

First, log into SonarQube UI and generate an access token for the project. Then, run this command in project root folder:

./mvnw clean verify sonar:sonar -Dsonar.login=TOKEN

Sonar for cmltemplate: link.

Makesure

This project includes the lightweight build system makesure.

Nothing is needed to install. The tool is bundled as a single script makesure in root folder. The build script is located in Makesurefile.

Issue ./makesure -l to show a list of available goals.

Update mvnw

./makesure mvnw_update

Swagger

Swagger UI available at http://localhost:8080/swagger-ui/index.html

Enable global CORS

Run either with --cors.enabled=true program argument OR with CORS_ENABLED=true environment variable.

Docker

See README-docker.md

MySQL

Run DB

./makesure mysqld

Connect via CLI:

./makesure mysql

PostgreSQL

Run DB

./makesure postgresd

Connect via CLI:

./makesure postgres

MongoDB

Run DB

./makesure mongod

Connect via CLI:

./makesure mongo

RabbitMQ

If you need to develop with RabbitMQ, in application.yml set the property rabbitmq.enabled to true.

Then run RabbitMQ server:

./makesure rabbitmq

Admin UI for RabbitMQ can be accessed by link http://localhost:15672/. The default credentials is:

login   : guest
password: guest

To test how messaging works make this call in java code with appropriate data

rabbitTemplate.convertAndSend(routingKey, "Prepared message"); 

And listener will return to you this message: Message read from the queue : Prepared message

Useful links