• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

spring-boot-maven-plugin引入出现爆红(已解决)

java 搞代码 4年前 (2022-01-09) 22次浏览 已收录 0个评论

一、问题描述

换了一台电脑,重新进行idea安装配置。然后打开原来的项目结果引入spring-boot-maven-plugin出现爆红,而且spring-boot-starter-parent也不能引入。

二、解决办法

1.检查环境配置,主要是settings.xml此文件配置情况是否正确,是否加入阿里云镜像。最好用idea工具打开检查一下是否规范,此次我的问题就出在settings.xml报错了(网上随意复制粘贴了一个)。settings.xml配置文件以及idea工具打开查看的方式如下所示。

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<!-- 配置本地仓库地址 -->
	<!--<localRepository>E:\maven\repository</localRepository>-->

	<!-- 配置下载Jar包的镜像仓库地址 -->
	<mirrors>

		 <mirror>
		  <id>alimaven</id>
		  <name>aliyun maven</name>
		  <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
		  <mirrorOf>central</mirrorOf>
		 </mirror>

		 <mirror>
		  <id>uk</id>
		  <name>Human Readable Name for this Mirror.</name>
		  <url>http://uk.maven.org/maven2/</url>
			<mirrorOf>central</mirrorOf>
		 </mirror>

		 <mirror>
		  <id>nexus</id>
		  <name>internal nexus repository</name>
		  <url>http://repo.maven.apache.org/maven2</url>
		  <mirrorOf>central</mirrorOf>
		 </mirror>
	</mirrors>

	<profiles>
		<!-- 下载源代码和Javadoc -->
		<profile>
			<id>downloadSources</id>
			<properties>
				<downloadSources>true</downloadSources>
				<downloadJavadocs>tr<strong style="color:transparent">本文来源gaodai#ma#com搞@@代~&码*网/</strong>ue</downloadJavadocs>
			</properties>
		</profile>
	</profiles>

	<!-- 激活在profiles的配置项 -->
	<activeProfiles>
		<activeProfile>downloadSources</activeProfile>
	</activeProfiles>

</settings>

2.检查代码是否出错,加上具体版本号。

参考:https://blog.gaodaima.com/weixin_41988224/article/details/104388981

到此这篇关于spring-boot-maven-plugin引入出现爆红(已解决)的文章就介绍到这了,更多相关spring-boot-maven-plugin爆红内容请搜索搞代码以前的文章或继续浏览下面的相关文章希望大家以后多多支持搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:spring-boot-maven-plugin引入出现爆红(已解决)
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址