当前使用版本(必填,否则不予处理)

从 MP 3.3.1 升级到 3.3.2

该问题是如何引起的?(确定最新版也有问题再提!!!)

  1. 多了很多 kotlin 开头的包, 这些包是否必要?
  2. 多了几个不必要的包(这两个包只在编译期有作用,现在却被打到构建物里) spring-boot-autoconfigure-processor-2.3.0.RELEASE.jar spring-boot-configuration-processor-2.3.0.RELEASE.jar

版本信息 java8 spring boot 2.3.0

Comment From: qmdx

1164006 如图并没有你说的情况,这里是 gradle 构建,你刷新下依赖看看 ?

Comment From: timandy

@qmdx 看这个地方看不出来, 要打成 spring boot 的 fat-jar 然后解压看一下.我一会截一个对比图. 已经确认是 3.3.2 引入的

Comment From: timandy

对比

Comment From: qmdx

经过依赖分析应该是 spring-boot-dependencies 引起

productionRuntimeClasspath
+--- org.springframework.boot:spring-boot-starter-undertow -> 2.3.0.RELEASE
|    +--- org.springframework.boot:spring-boot-dependencies:2.3.0.RELEASE
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72 (c)
|    |    +--- org.springframework:spring-context-support:5.2.6.RELEASE (c)
|    |    +--- org.springframework:spring-tx:5.2.6.RELEASE (c)
|    |    +--- org.springframework:spring-web:5.2.6.RELEASE (c)
|    |    +--- org.springframework:spring-webmvc:5.2.6.RELEASE (c)
|    |    +--- com.fasterxml:classmate:1.5.1 (c)
|    |    +--- commons-codec:commons-codec:1.14 (c)
|    |    +--- org.glassfish:jakarta.el:3.0.3 (c)
|    |    +--- org.hibernate.validator:hibernate-validator:6.1.5.Final (c)
|    |    +--- jakarta.servlet:jakarta.servlet-api:4.0.3 (c)
|    |    +--- javax.activation:javax.activation-api:1.2.0 (c)
|    |    +--- javax.xml.bind:jaxb-api:2.3.1 (c)
|    |    +--- com.squareup.okhttp3:okhttp:3.14.8 -> 4.3.1 (c)
|    |    +--- org.postgresql:postgresql:42.2.12 (c)
|    |    +--- org.quartz-scheduler:quartz:2.3.2 (c)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure-processor:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-configuration-processor:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter-jdbc:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter-json:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter-quartz:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter-undertow:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE (c)
|    |    +--- org.slf4j:slf4j-api:1.7.30 (c)
|    |    +--- io.undertow:undertow-core:2.1.0.Final (c)
|    |    +--- io.undertow:undertow-servlet:2.1.0.Final (c)
|    |    +--- org.jboss.logging:jboss-logging:3.4.1.Final (c)
|    |    +--- org.springframework.boot:spring-boot:2.3.0.RELEASE (c)
|    |    +--- org.springframework.boot:spring-boot-starter-logging:2.3.0.RELEASE (c)
|    |    +--- jakarta.annotation:jakarta.annotation-api:1.3.5 (c)
|    |    +--- org.springframework:spring-core:5.2.6.RELEASE (c)
|    |    +--- org.yaml:snakeyaml:1.26 (c)
|    |    +--- com.fasterxml.jackson.core:jackson-databind:2.11.0 (c)
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0 (c)
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0 (c)
|    |    +--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0 (c)
|    |    +--- org.springframework:spring-beans:5.2.6.RELEASE (c)
|    |    +--- org.springframework:spring-aop:5.2.6.RELEASE (c)
|    |    +--- org.springframework:spring-context:5.2.6.RELEASE (c)
|    |    +--- org.springframework:spring-expression:5.2.6.RELEASE (c)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.72 (c)
|    |    +--- org.thymeleaf:thymeleaf:3.0.11.RELEASE (c)
|    |    +--- org.freemarker:freemarker:2.3.30 (c)
|    |    +--- com.zaxxer:HikariCP:3.4.5 (c)
|    |    +--- org.springframework:spring-jdbc:5.2.6.RELEASE (c)
|    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.11.0 (c)
|    |    +--- jakarta.validation:jakarta.validation-api:2.0.2 (c)
|    |    +--- ch.qos.logback:logback-classic:1.2.3 (c)
|    |    +--- org.apache.logging.log4j:log4j-to-slf4j:2.13.2 (c)
|    |    +--- org.slf4j:jul-to-slf4j:1.7.30 (c)
|    |    +--- org.springframework:spring-jcl:5.2.6.RELEASE (c)
|    |    +--- com.fasterxml.jackson.core:jackson-core:2.11.0 (c)
|    |    +--- org.apache.commons:commons-lang3:3.10 (c)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72 (c)
|    |    +--- org.jetbrains.kotlin:kotlin-reflect:1.3.72 (c)
|    |    +--- com.google.code.gson:gson:2.8.6 (c)
|    |    +--- net.bytebuddy:byte-buddy:1.10.10 (c)
|    |    +--- ch.qos.logback:logback-core:1.2.3 (c)
|    |    +--- org.apache.logging.log4j:log4j-api:2.13.2 (c)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72 (c)
|    |    +--- net.sf.ehcache:ehcache:2.10.6 (c)
|    |    +--- redis.clients:jedis:3.3.0 (c)
|    |    \--- org.apache.commons:commons-pool2:2.8.0 (c)
+--- com.baomidou:mybatis-plus-boot-starter:3.3.2
|    +--- com.baomidou:mybatis-plus:3.3.2
|    |    \--- com.baomidou:mybatis-plus-extension:3.3.2
|    |         +--- com.baomidou:mybatis-plus-core:3.3.2
|    |         |    +--- com.baomidou:mybatis-plus-annotation:3.3.2
|    |         |    |    \--- org.mybatis:mybatis:3.5.4
|    |         |    +--- com.github.jsqlparser:jsqlparser:3.1
|    |         |    \--- org.mybatis:mybatis:3.5.4
|    |         \--- org.mybatis:mybatis-spring:2.0.4

Comment From: qmdx

@timandy 如上

Comment From: timandy

相同的 spring boot 版本, 只升级 mybatis-plus 的版本就会多出很多无关的包. 例如 fastjson, mybatis-plus-generator,processor 等等. 我上传了一个 demo 请看一下. demo.zip

Comment From: timandy

@qmdx

Comment From: miemieYaho

MyBatis-Plus 新版本包引用问题 并没有你说的问题

Comment From: nieqiurong

gradle构建的话,先把gradle版本改成5.x版本,例如5.6.4。

Comment From: timandy

用 gradlew clean build 打的包

Comment From: nieqiurong

使用快照版本试试 3.3.3.2-SNAPSHOT,快照使用方式 https://mp.baomidou.com/guide/install.html#snapshot