English 中文(简体)
尽管在受抚养人管理范围内更新了父母的一揽子抚养方案,但产妇过渡性受扶养人显示较老的版本。
原标题:Maven transitive dependency shows older version even though parent package is updated within dependencyManagement
I have the following POM (not the complete file): UTF-8 11 11 2.4.0 2.5.15 org.springframework.boot spring-boot-starter-web ${spring.boot.starter.web.version} org.springframework.boot spring-boot-dependencies ${spring.boot.version} pom import org.springframework.boot spring-boot-starter-web ${spring.boot.starter.web.version} maven-clean-plugin 3.1.0 maven-resources-plugin 3.0.2 maven-compiler-plugin 3.8.0 maven-surefire-plugin 2.22.1 maven-jar-plugin 3.0.2 maven-install-plugin 2.5.2 maven-deploy-plugin 2.8.2 maven-site-plugin 3.7.1 maven-project-info-reports-plugin 3.0.0 When I run: mvn dependency:tree -Dincludes=org.springframework:spring-webmvc -Dverbose I get the following output: [INFO] Scanning for projects... [INFO] [INFO] --------------------------< com.example:demo >-------------------------- [INFO] Building demo 1.0-SNAPSHOT [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- dependency:3.6.1:tree (default-cli) @ demo --- [INFO] com.example:demo:jar:1.0-SNAPSHOT [INFO] - org.springframework.boot:spring-boot-starter-web:jar:2.5.15:compile [INFO] - org.springframework:spring-webmvc:jar:5.3.1:compile (version managed from 5.3.27) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ The issue here is even though I have overriden spring-boot-starter-web in dependencyManagement and declared it before spring-boot-dependencies, the version of spring-webmvc being used is still 5.3.1 and not 5.3.27 or am I misundersanding the meaning of (version managed from 5.3.27). The version 2.5.15 of spring-boot-starter-web uses the version 5.3.27 of spring-webmvc. I am required to use this version because of vulnerability concerns detected by a package scanner.
问题回答
I d remove the spring-boot-starter-web and declare spring-web there instead. You got it right, it has to be before spring-boot-dependencies BOM import. Another thing that I ve done on projects where I m stuck on SB 2 was adding a BOM import for Spring and Spring Security, as spring-boot-dependencies BOM no longer ships with updates, so I could still update for vulnerability fixes. org.springframework spring-framework-bom ${spring.version} pom import org.springframework.security spring-security-bom ${spring-security.version} pom import




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签