Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the control mode of version declaration that maven depends on

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Most people do not understand the knowledge points of this article "maven depends on version declaration control mode", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article "what is the version declaration control mode that maven depends on?"

Version declaration control on which maven depends

When writing a new springcloud project

Start error reporting Correct the classpath of your application so that it contains a single, compatible version of.

The idea is to make sure that the version of the jar package is compatible and unique.

Why did this happen? Because the parent module declares the version of a jar package, the child module should not declare version when importing, otherwise it will conflict. Of course, most people will not foolishly re-declare the version, the complicated situation is: the parent module declared jar package contains a jar package imported by the sub-module, but the child module does not know that the parent module contains this jar package, will declare version again.

Here is an example of the registry module of springcloud

The parent module le and the registry module le-registry are all explained in the figure:

The maven setting depends on the version property

In the pom.xml file:

1. Join profiles spring.version 4.0.0.RELEASE 2 and replace org.springframework spring-context ${spring.version} with ${name} at version. The above is about "what is the version declaration control mode of maven dependency?". I believe you all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to learn more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report