I developed a controllerAdvice that I want to put it in a librairie that will be used by several microservices; Since my library is using spring annotations I m adding plugins and dependencies for springboot. However when I add
apply plugin: 'org.springframework.boot'
this adds me a bootJar step in the build step. The bootJar asking that I should have a main class for the spring boot the thing that I dont want too, since my jar is only a library and not a springboot application.
here is a part of my gradle.build script :
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.test'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
repositories {
mavenCentral()
maven {
url = artifactoryRepoUrl
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
compile("org.springframework.boot:spring-boot-configuration-processor")
compile("org.springframework.boot:spring-boot-starter-hateoas")
testCompile('org.springframework.boot:spring-boot-starter-test')
compileOnly('org.projectlombok:lombok:1.18.6')
annotationProcessor('org.projectlombok:lombok:1.18.6')
}
how can I resolve this issue ?