Ниже приведены настройки для проектов с начальной загрузкой 2
Coreservices - содержит объекты домена с начальной загрузкой всего приложения: выходной JAR со своими собственными конфигурациями сборки gradle
Награды - Содержит файлы, связанные с модулем Награды (Контроллеры, службы (Business Logic Services), Представления): Выходной WAR-файл - зависит от вышеуказанных основных служб, также имеет свои собственные свойства сборки gradle
Когда я проверял конечную точку привода для приложения наград
Например: http://localhost:8080/rewards/actuator/info - извлекал информацию о сборке coreservices вместо сведений о сборке приложения наград
Что могло вызвать побуждение привода получить сведения оcoreservices вместо наград?
награды build.gradle
plugins {
id 'org.springframework.boot' version '2.1.8.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id 'war'
id 'maven'
}
apply plugin: 'io.spring.dependency-management'
group = 'com.rewards'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
bootJar {
archiveName = "$baseName.$extension"
}
bootWar {
archiveName = "$baseName.$extension"
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
// repo configs
ext {
set('springBootAdminVersion', "2.1.5")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-batch'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-jersey'
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
implementation 'de.codecentric:spring-boot-admin-starter-client'
implementation 'de.codecentric:spring-boot-admin-starter-server'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// runtimeOnly 'mysql:mysql-connector-java'
runtimeOnly 'mysql:mysql-connector-java:5.1.34'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.batch:spring-batch-test'
testImplementation 'org.springframework.security:spring-security-test'
compile 'com.aniketh.platform:coreservices:0.0.1-SNAPSHOT'
}
dependencyManagement {
imports {
mavenBom "de.codecentric:spring-boot-admin-dependencies:${springBootAdminVersion}"
}
}
Coreservices build.gradle
plugins {
id 'org.springframework.boot' version '2.1.8.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id 'maven'
id 'maven-publish'
}
group = 'com.aniketh.platform'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
bootJar {
archiveName = "$baseName-boot"+".$extension"
classifier = 'boot'
}
jar {
enabled = true
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
exclude 'com/aniketh/platform/coreservices/configs/**'
/*archiveBaseName = "$baseName"
archiveVersion = '1.0.0'*/
}
repositories {
mavenCentral()
}
springBoot {
mainClassName = 'com.aniketh.platform.coreservices.CoreservicesApplication'
buildInfo()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
compile 'io.springfox:springfox-swagger2:2.9.2'
compile 'io.springfox:springfox-swagger-ui:2.9.2'
compile 'org.ehcache:ehcache:3.3.1'
compile 'javax.cache:cache-api'
compile 'org.apache.commons:commons-lang3:3.0'
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'commons-logging:commons-logging:1.2'
compile 'org.apache.httpcomponents:httpclient'
compile 'org.codehaus.jettison:jettison:1.4.0'
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.0'
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
//upload and publish tasks