MyGit

spring-media/gradle-spring-boot-conventions-plugin

Fork: 3 Star: 3 (更新于 2024-12-11 08:04:45)

license: MIT

Language: Groovy .

Best practices and conventions for developing Spring Boot microservices

官方网址 GitHub网址

Gradle Spring Boot Conventions Plugin Build Status

This plugin applies best practices and conventions for developing Spring Boot microservices at welt.

Usage

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'

Preconditions

  • currently this plugin supports only Spring Boot projects 1.3.0M2+
  • plugin tested with Gradle 2.4+ in single and multi project setups

Conventions

Project

The following standard Gradle plugins will be applied automatically:

Dependencies

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

Testing the functionality of the plugin during the development can be achieved manually by executing the following steps:

  1. Publish your new changes to your local maven repository with ./gradlew publishToMavenLocal (don't forget to increment the version number)

  2. Add the local Maven cache as a repository in an another gradle project than can integrate with the plugin:

    buildscript {
        repositories {
            mavenLocal()
        }
    }    
    
  3. Use the updated version of the plugin as a local dependency with the gradle project from the step before and run the plugin

Publishing

Publishing is automatically done by SnapCI after a commit with increased version.

Contributing

Contributions are more than welcome. Please follow the pull request pro tips in order to submit your changes.

License

Copyright (c) 2015 WeltN24 GmbH

Licensed under the MIT license.

最近版本更新:(数据更新于 2024-10-14 05:25:25)

主题(topics):

gradle, java, spring-boot

spring-media/gradle-spring-boot-conventions-plugin同语言 Groovy最近更新仓库

2024-12-21 00:29:29 gradle/gradle

2023-07-15 08:08:41 google/protobuf-gradle-plugin

2023-04-03 16:51:41 palantir/gradle-docker

2022-09-09 20:01:49 researchgate/gradle-release

2016-08-25 02:42:24 okjsp/okky

1970-01-01 00:00:00 paraujof/springio