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

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

截止目前,同学们一共提了128555个问题
张欣怡2024-05-09 19:46:02

PPT里面有一个输出

这个是啥意思看不懂Screenshot_20240509-194501.png

相关课程:JAVA 全系列/第一阶段:JAVA 快速入门/变量、数据类型、运算符
《重拾_快乐》2024-05-09 16:33:07
老师,这是我写的两段代码,但是ArrayList是有序,可重复的,但是运行结果为什么是无序的,而使用Set反而是有序的

image.png

image.png

相关课程:JAVA 全系列/第二阶段:JAVA 基础深化和提高/容器
www2024-05-09 16:15:27

maven网站进不去

QQ截图20240509161355.png


相关课程:JAVA 全系列/第六阶段:项目管理与SSM框架/Maven
真好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 快速入门/变量、数据类型、运算符
倾尽年华终是梦2024-05-07 19:45:58

老师我按照视频步骤来的,但显示图片上传失败


相关课程:JAVA 全系列/第十阶段:百战旅游网项目/百战旅游网
hua2024-05-04 08:30:57

老师,我这打包后的格式和视频上的压缩包格式不符,是什么问题导致呢?image.png


相关课程:JAVA 全系列/第八阶段:SpringBoot与MybatisPlus/Spring Boot
...2024-05-03 15:18:28

结果变成这样了

image.png

相关课程:JAVA 全系列/第十二阶段:Spring Cloud Alibaba技术栈/云原生网关-Higress
火力全开2024-05-03 05:46:20

老师,这一集的文档笔记好像有个地方打错了,应该把“商品服务模块”修改为“搜索服务模块

相关课程:JAVA 全系列/第十八阶段:亿级高并发电商项目/亿级高并发电商项目-新

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