Use this template as a base for your Spring Boot app @ CML
Spring Boot | Java | MySQL | Postgres |
---|---|---|---|
3.x | 17 | 8 | 13 |
bash -c "$(curl -sSL "https://raw.githubusercontent.com/CMLTeam/cmltemplate/master/init.sh?token=$(date +%T)")"
and follow instructions.
The project folder with scaffolded code will be created in current folder.
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.
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.
./makesure mvnw_update
Swagger UI available at http://localhost:8080/swagger-ui/index.html
Run either with --cors.enabled=true
program argument OR with CORS_ENABLED=true
environment variable.
See README-docker.md
Run DB
./makesure mysqld
Connect via CLI:
./makesure mysql
Run DB
./makesure postgresd
Connect via CLI:
./makesure postgres
Run DB
./makesure mongod
Connect via CLI:
./makesure mongo
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