This plugin applies best practices and conventions for developing Spring Boot microservices at welt.
See plugin portal.
The plugin applies only conventions and best practices. The necessary Gradle configuration for developing Spring Boot applications must be done in the project itself.
Example:
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://repo.spring.io/milestone" }
}
dependencies {
classpath(
'org.springframework.boot:spring-boot-gradle-plugin:1.4.0.M3',
'gradle.plugin.de.weltn24:spring-boot-conventions:4.0.0',
)
}
}
apply plugin: 'spring-boot'
apply plugin: 'de.weltn24.spring-boot-conventions'
- currently this plugin supports only Spring Boot projects 1.3.0M2+
- plugin tested with Gradle 2.4+ in single and multi project setups
The following standard Gradle plugins will be applied automatically:
The following dependencies will be added to the classpath:
Scope | Dependency | Description |
---|---|---|
compile | org.springframework.boot:spring-boot-starter-actuator | production ready HTTP endpoints |
compile | org.springframework.boot:spring-boot-starter-security | default spring security configuration |
compile | org.springframework.boot:spring-boot-devtools | tools supporting rapid development of boot apps (restarting etc.) |
runtime | org.jolokia:jolokia-core | JMX-HTTP bridge to access JMX beans |
testCompile | org.springframework.boot:spring-boot-starter-test | best practices of libraries to write automated tests for spring apps |
Testing the functionality of the plugin during the development can be achieved manually by executing the following steps:
-
Publish your new changes to your local maven repository with
./gradlew publishToMavenLocal
(don't forget to increment the version number) -
Add the local Maven cache as a repository in an another gradle project than can integrate with the plugin:
buildscript { repositories { mavenLocal() } }
-
Use the updated version of the plugin as a local dependency with the gradle project from the step before and run the plugin
Publishing is automatically done by SnapCI after a commit with increased version.
Contributions are more than welcome. Please follow the pull request pro tips in order to submit your changes.
Copyright (c) 2015 WeltN24 GmbH
Licensed under the MIT license.