Closed zhangvv123 closed 1 year ago
Spring Boot 2.3 has been out of support for almost three years. Please upgrade to Spring Boot 2.7.x or later. If the problem remains, you will need to configure your frog-test
project to consume the plain jar that frog-web
builds with its jar
task rather than the fat jar that it builds with its bootJar
task.
If you have any further questions about this, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.
I created a project
How should I configure it so that I can unit test the frog-web's classes in the frog-test module? THANKS!!!
This the code
frog
build.gradle
allprojects { apply plugin: 'java-library' apply plugin: 'org.springframework.boot' group 'site.weic' version 'dev-v0.2-SNAPSHOT' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 tasks.withType(JavaCompile) { options.encoding 'UTF-8' } repositories { mavenLocal() maven { url 'https://maven.aliyun.com/repository/public' } mavenCentral() } bootJar { enabled false } }
subprojects { apply plugin: 'io.spring.dependency-management' dependencies { annotationProcessor 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok' implementation 'org.slf4j:slf4j-api' } dependencyManagement { dependencies { dependency "org.projectlombok:lombok:1.18.26" dependency "mysql:mysql-connector-java:8.0.23" } imports { mavenBom "org.springframework.boot:spring-boot-starter-parent:2.3.12.RELEASE" } } }
frog-test
site.weic.frog.test.A01Test
test { useJUnitPlatform() }