Project to create a default spring-bbot template project with some default configurations:
- Spring-Boot
- spring actuator with custom path: http://localhost:8080/actuator/*
- Application server is undertow
- Modules are : WS, Core, Worker
- Cache with redis server
- Swagger configuration
- ResourceBundle Configuration, please use messages.properties file in core module, to input your messages
- Metrics configurations. To emtrics works it is necessary input an @Timed annotation (Acesso: http://localhost:8080/actuator/metrics)
First you need to install the archetype in your repository:
- Clone git repository
- Execute: mvn clean install
- Now you are able to use it
After installed project on your repository, it's just you execute this command:
#!bash
mvn archetype:generate \
-DarchetypeGroupId=br.com.viniciustoni \
-DarchetypeArtifactId=spring-boot-redis-cache-web-worker-core-archetype \
-DarchetypeVersion=1.0 \
-DgroupId=<GROUP_NAME> \
-DartifactId=<PROJECT_NAME> \
-DmodulePrefix=<MODULE_PREFIX>
The custom parameters are:
- GROUP_NAME: Group id of yout project. Ex.: br.com.viniciustoni
- PROJECT_NAME: Your project name: Ex.: spring-boot-hello-world
- MODULE_PREFIX: Module's prefix names, use only alphanumeric [a-z][A-Z][0-9]. This parameter will be uses to create modules's prefix name: module_prefix-core, module_prefix-ws, module_prefix-worker: Ex.: helloWorld
After create your template you will need to configure some thing with your own parameters
- Class SwaggerConfig: You need to change some parameters to swagger create info page: group name, title e description
- Class TemplateWsApplication: Change to your own class name
- Class TemplateWorkerQueue: Change to your own class name
- application.yml file: You will need to change cache.names properties to your own cache names.