欢迎来到代码驿站!

JAVA代码

当前位置:首页 > 软件编程 > JAVA代码

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

时间:2021-08-21 09:09:58|栏目:JAVA代码|点击:

一、问题描述

换了一台电脑,重新进行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>true</downloadJavadocs>
			</properties>
		</profile>
	</profiles>

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

</settings>

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

参考:https://blog.csdn.net/weixin_41988224/article/details/104388981

上一篇:关于Springboot | @RequestBody 接收到的参数对象属性为空的问题

栏    目:JAVA代码

下一篇:Ubuntu搭建Java开发环境笔记

本文标题:spring-boot-maven-plugin引入出现爆红(已解决)

本文地址:http://www.codeinn.net/misctech/168565.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有