gradle
原因是在spring-boot-starter-test拉入“ android-json”(com.vaadin.external.google) 解决方法是: 在 配置 文件中 把对应的jar包依赖忽略掉即可
dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-redis' compileOnly 'org.springframework.boot:spring-boot-configuration-processor' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' developmentOnly 'org.springframework.boot:spring-boot-devtools' // implementation 'org.springframework.boot:spring-boot-starter-log4j2' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'com.vaadin.external.google', module: 'android-json' } implementation 'org.jsoup:jsoup:1.10.3' implementation 'org.json:json:20190722' }