会员可以在此提问,尚新途老师有问必答

对大家有帮助的问答会被标记为“推荐”,看完课程过来浏览一下别人提的问题,会帮你学得更全面

截止目前,同学们一共提了128829个问题
微信用户2024-05-20 12:03:40

为什么这里不加载驱动就可以使用数据库了呢

相关课程:JAVA 全系列/第六阶段:项目管理与SSM框架/Maven
2024-05-18 15:10:26

我这检查了好几遍代码也没问题,密码对了也报这个错误


相关课程:JAVA 全系列/第五阶段:JavaWeb开发/Web实战案例
2024-05-18 15:09:47

image.pngwo

相关课程:JAVA 全系列/第五阶段:JavaWeb开发/Web实战案例
微信用户2024-05-17 21:52:27

image.png

相关课程:JAVA 全系列/第一阶段:JAVA 快速入门/JAVA入门和背景知识
2024-05-17 09:21:57

我穿越了?,怎么多了个配置文件


相关课程:JAVA 全系列/第六阶段:项目管理与SSM框架/Spring6
张欣怡2024-05-14 18:56:16

Screenshot_20240514-185545.png这老师,是句话是什么意思

相关课程:JAVA 全系列/第一阶段:JAVA 快速入门/面向对象详解和JVM底层内存分析
张松波2024-05-11 21:33:11

image.pngimage.png

相关课程:JAVA 全系列/第五阶段:JavaWeb开发/Web实战案例
张松波2024-05-11 15:03:50

webdemo1.zip

登录密码是对的一直报错

密码错误

相关课程:JAVA 全系列/第五阶段:JavaWeb开发/Web实战案例
真好2024-05-08 17:39:29

关于maven项目中

<dependencyManagement>

标签使用的问题



问题描述:

对于pom.xml中<dependencyManagement>使用,我的理解是,子项目需要与父项目中groupIdartifactId对应,才能匹配上版本号。

但是这种情况,子项目只有groupId与父<dependencyManagement>中的groupId匹配上了,artifactId没有匹配上,但却仍然匹配上了了版本号,这是为什么?

具体例子:


父项目:

<dependencyManagement>
 <dependencies>
   <dependency>
     <groupId>org.springframework.cloud</groupId>
     <artifactId>spring-cloud-dependencies</artifactId>
     <version>Greenwich.SR5</version>
     <type>pom</type>
     <scope>import</scope>
   </dependency>
 </dependencies>
</dependencyManagement>



子项目:

<dependencies>
 <dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
 </dependency>
 <dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
 </dependency>
</dependencies>



我的理解是:子项目根据<groupId>org.springframework.cloud</groupId>与父项目<dependencyManagement>中groupId匹配上了,由于父项目中<artifactId>spring-cloud-dependencies</artifactId>里面含有   <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>和

   <artifactId>spring-cloud-starter-netflix-zuul</artifactId>,所以也能匹配上,匹配的版本号就是与父项目<artifactId>spring-cloud-dependencies</artifactId>中对应的

<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>和

   <artifactId>spring-cloud-starter-netflix-zuul</artifactId>,版本号



请老师帮忙解答下?

相关课程:JAVA 全系列/第十九阶段:Spring Cloud微服务技术栈/Spring Cloud
章帆2024-05-08 13:53:21

请问一下老师,单行注释以//开头,有没有以什么结束?我理解只要回车以后就算结束了

相关课程:JAVA 全系列/第一阶段:JAVA 快速入门/变量、数据类型、运算符

©2014-2023 百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备13018289号-12    营业执照    经营许可证:京B2-20212637