使用IDEA社区版创建SpringBoot项目

文章目录

  • 1.关于IDEA社区版的版本
  • 2.下载Spring Boot Helper
  • 3.创建项目
  • 4.配置Maven国内源
    • 4.1找不到settings.xml的情况
    • 4.2找得到settings.xml的情况
  • 4.3删除repository目录下的所有文件和目录
  • 5.加载项目
  • 6.解决`org.springframework.boot:spring-boot-starter-parent:pom:2.7.13.RELEASE was not found`

1.关于IDEA社区版的版本

专业版的IDEA可以直接创建SpringBoot项目,但是社区版就要下载Spring Boot Helper插件才能创建SpringBoot项目。

在这里插入图片描述

问题就在于Spring Boot Helper这个插件在新版本IDEA版本中是要收费的。
下面是这个插件官网中给出的一些版本信息。

在这里插入图片描述
在这里插入图片描述

Spring Boot HelperIDEA社区版的版本是绑定的,如果你想要用Spring Boot Helper的免费版本,就必须下载对应版本的IDEA社区版。如上图你可以下载2021.1-2022.1.4之间的版本,下面是官网的链接:

请添加图片描述

https://www.jetbrains.com/zh-cn/idea/download/other.html

往下滑就可以找到对应的版本了。

在这里插入图片描述

2.下载Spring Boot Helper

下载完对应的版本之后,进入IDEA的主界面。

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

下载完后点击Installed

在这里插入图片描述

>等待插件下载完即可

3.创建项目

下载完成后就可以创建项目了,下面是创建项目的步骤。

在这里插入图片描述

出现Spring Initializr的图标,说明插件装成功了。
没有出现这个图标,检查下载插件的时候有没有错。

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

点击next,继续着后面步骤操作

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

创建完成, 如下图:

在这里插入图片描述

项目创建好了,但是项目还没加载好,我们需要用Maven加载项目

在这里插入图片描述
在这里插入图片描述

接下来会切换到下面的界面:

在这里插入图片描述
如果出现很多报错的情况不要慌,这是正常的,下面解决Maven的问题。

4.配置Maven国内源

国外的Maven源,国内的网可能访问不到,或者很慢。所以需要将Maven换成国内的源。
下面开始操作:

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

4.1找不到settings.xml的情况

在这里插入图片描述

打开.m2目录后,找不到settings.xml
我已经上传了这个文件,滑到博客的最上面(需要VIP, CSDN是这样的)或者复制下面的代码手动创建一个settings.xml
而且已经配置好了国内源 , 直接把这个文件放到.m2目录下就行了。

<?xml version="1.0" encoding="UTF-8"?><!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
--><!--| This is the configuration file for Maven. It can be specified at two levels:||  1. User Level. This settings.xml file provides configuration for a single user,|                 and is normally provided in ${user.home}/.m2/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -s /path/to/user/settings.xml||  2. Global Level. This settings.xml file provides configuration for all Maven|                 users on a machine (assuming they're all using the same Maven|                 installation). It's normally provided in|                 ${maven.conf}/settings.xml.||                 NOTE: This location can be overridden with the CLI option:||                 -gs /path/to/global/settings.xml|| The sections in this sample file are intended to give you a running start at| getting the most out of your Maven installation. Where appropriate, the default| values (values used when the setting is not specified) are provided.||-->
<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| The path to the local repository maven will use to store artifacts.|| Default: ${user.home}/.m2/repository<localRepository>/path/to/local/repo</localRepository>--><!-- interactiveMode| This will determine whether maven prompts you when it needs input. If set to false,| maven will use a sensible default value, perhaps based on some other setting, for| the parameter in question.|| Default: true<interactiveMode>true</interactiveMode>--><!-- offline| Determines whether maven should attempt to connect to the network when executing a build.| This will have an effect on artifact downloads, artifact deployment, and others.|| Default: false<offline>false</offline>--><!-- pluginGroups| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.|--><pluginGroups><!-- pluginGroup| Specifies a further group identifier to use for plugin lookup.<pluginGroup>com.your.plugins</pluginGroup>--></pluginGroups><!-- proxies| This is a list of proxies which can be used on this machine to connect to the network.| Unless otherwise specified (by system property or command-line switch), the first proxy| specification in this list marked as active will be used.|--><proxies><!-- proxy| Specification for one proxy, to be used in connecting to the network.|<proxy><id>optional</id><active>true</active><protocol>http</protocol><username>proxyuser</username><password>proxypass</password><host>proxy.host.net</host><port>80</port><nonProxyHosts>local.net|some.host.com</nonProxyHosts></proxy>--></proxies><!-- servers| This is a list of authentication profiles, keyed by the server-id used within the system.| Authentication profiles can be used whenever maven must make a connection to a remote server.|--><servers><!-- server| Specifies the authentication information to use when connecting to a particular server, identified by| a unique name within the system (referred to by the 'id' attribute below).|| NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are|       used together.|<server><id>deploymentRepo</id><username>repouser</username><password>repopwd</password></server>--><!-- Another sample, using keys to authenticate.<server><id>siteServer</id><privateKey>/path/to/private/key</privateKey><passphrase>optional; leave empty if not used.</passphrase></server>--></servers><!-- mirrors| This is a list of mirrors to be used in downloading artifacts from remote repositories.|| It works like this: a POM may declare a repository to use in resolving certain artifacts.| However, this repository may have problems with heavy traffic at times, so people have mirrored| it to several places.|| That repository definition will have a unique id, so we can create a mirror reference for that| repository, to be used as an alternate download site. The mirror site will be the preferred| server for that repository.|--><mirrors><mirror><id>aliyunmaven</id><name>aliyun Maven</name><mirrorOf>*</mirrorOf><url>https://maven.aliyun.com/repository/public</url></mirror><!-- mirror| Specifies a repository mirror site to use instead of a given repository. The repository that| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.|<mirror><id>mirrorId</id><mirrorOf>repositoryId</mirrorOf><name>Human Readable Name for this Mirror.</name><url>http://my.repository.com/repo/path</url></mirror>--></mirrors><!-- profiles| This is a list of profiles which can be activated in a variety of ways, and which can modify| the build process. Profiles provided in the settings.xml are intended to provide local machine-| specific paths and repository locations which allow the build to work in the local environment.|| For example, if you have an integration testing plugin - like cactus - that needs to know where| your Tomcat instance is installed, you can provide a variable here such that the variable is| dereferenced during the build process to configure the cactus plugin.|| As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles| section of this document (settings.xml) - will be discussed later. Another way essentially| relies on the detection of a system property, either matching a particular value for the property,| or merely testing its existence. Profiles can also be activated by JDK version prefix, where a| value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.| Finally, the list of active profiles can be specified directly from the command line.|| NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact|       repositories, plugin repositories, and free-form properties to be used as configuration|       variables for plugins in the POM.||--><profiles><!-- profile| Specifies a set of introductions to the build process, to be activated using one or more of the| mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>| or the command line, profiles have to have an ID that is unique.|| An encouraged best practice for profile identification is to use a consistent naming convention| for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.| This will make it more intuitive to understand what the set of introduced profiles is attempting| to accomplish, particularly when you only have a list of profile id's for debug.|| This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.<profile><id>jdk-1.4</id><activation><jdk>1.4</jdk></activation><repositories><repository><id>jdk14</id><name>Repository for JDK 1.4 builds</name><url>http://www.myhost.com/maven/jdk14</url><layout>default</layout><snapshotPolicy>always</snapshotPolicy></repository></repositories></profile>--><!--| Here is another profile, activated by the system property 'target-env' with a value of 'dev',| which provides a specific path to the Tomcat instance. To use this, your plugin configuration| might hypothetically look like:|| ...| <plugin>|   <groupId>org.myco.myplugins</groupId>|   <artifactId>myplugin</artifactId>||   <configuration>|     <tomcatLocation>${tomcatPath}</tomcatLocation>|   </configuration>| </plugin>| ...|| NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to|       anything, you could just leave off the <value/> inside the activation-property.|<profile><id>env-dev</id><activation><property><name>target-env</name><value>dev</value></property></activation><properties><tomcatPath>/path/to/tomcat/instance</tomcatPath></properties></profile>--></profiles><!-- activeProfiles| List of profiles that are active for all builds.|<activeProfiles><activeProfile>alwaysActiveProfile</activeProfile><activeProfile>anotherAlwaysActiveProfile</activeProfile></activeProfiles>-->
</settings>

在这里插入图片描述

4.2找得到settings.xml的情况

找得到settings.xml,就要打开文件进行配置,很简单的一个操作,也是复制粘贴。

<mirror><id>aliyunmaven</id><name>aliyun Maven</name><mirrorOf>*</mirrorOf><url>https://maven.aliyun.com/repository/public</url>
</mirror>

复制上面的代码,然后找到<mirrors>标签,将上面代码粘贴到<mirrors>标签下面。
替换掉原本的源,换成阿里云的源。

在这里插入图片描述

4.3删除repository目录下的所有文件和目录

在这里插入图片描述

5.加载项目

配置完国内源之后就可以,去IDEA中用Maven加载项目了。

在这里插入图片描述

重新加载后,大概率是下面这种情况

在这里插入图片描述

报错信息:

Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.7.13.RELEASE 
in aliyunmaven (https://maven.aliyun.com/repository/public)

6.解决org.springframework.boot:spring-boot-starter-parent:pom:2.7.13.RELEASE was not found

在这里插入图片描述

解决后如下图:

请添加图片描述

在这里插入图片描述

成功启动

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/3492.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

laravel 的SQL使用正则匹配

案例场景 精准正则匹配 查询结果 代码如下 $regexp ^ . $new_str . [^0-9];$info Test::query()->where(is_del, 0)->whereRaw("name REGEXP $regexp")->pluck(name, id)->toArray();字符 “^” 匹配以特定字符或者字符串开头的文本 name 字段值包含…

记一次搞崩ubuntu系统的经历

本来想在ubuntu系统上安装一个windows系统&#xff0c;没想成在对磁盘进行分区的时候出错了&#xff0c;导致进入了grub模型&#xff0c;一直出不来&#xff0c; 过程中一些很好的链接放上来哈 市面上很少有的基于linux系统安装另外一个系统的&#xff08;感觉是非常靠谱的&…

php做网页版剪刀石头布的功能

实例讲述了php实现的网页版剪刀石头布攻略在玩游网上的设计。分享给大家供大家参考&#xff0c;具体如下&#xff1a; <?php /* * Created on 2016-11-25 * */ if (isset($_POST[sub])) { $what $_POST[what]; //需要输入的数组 $my_array array("剪刀","…

数据可视化揭示人口趋势:从数字到图像的转变

人口是一个关乎我们生活的重要话题&#xff0c;而数据可视化技术为我们提供了一种全新的方式来理解和解读人口变化的趋势。通过将大量的人口数据转化为直观的图表和图像&#xff0c;数据可视化帮助我们更好地观察、分析和解释人类发展的重要特征。 数据可视化揭示人口趋势的第一…

Spring @RequestMapping 工作原理

Spring RequestMapping 工作原理 配置基础启动类及Controller类 SpringBootApplication public class DemoServiceApplication {public static void main(String[] args) {SpringApplication.run(DemoServiceApplication.class, args);} }RestController public class HelloC…

SQLite指令

一、创建数据库 方式一&#xff1a; 1. sqlite3 进入数据库 2. .open test.db 3. .quit 数据库退出后在命令当前路径创建数据库 test.db 方式二&#xff1a; sqlite3 test.db // 在命令运行当前窗口创建数据库 test.db 在数据库命令下 .databases // 列出…

【YOLO】自定义训练数据(roboflow版)

YOLOv5自定义训练数据(roboflow版) 上一章 yolov5部署与推理 文章目录 YOLOv5自定义训练数据(roboflow版)前言一、Roboflow1. 数据标注2. 创建训练模型3. 划分数据集4.数据预处理5. 生成最终预训练数据集6.开始训练7. 选择预训练模型8. 可视化9. 推理10. 如何加载其他预训…

自动驾驶商用驶入“快车道”,汽车软件厂商如何“抢市”?

L3级及以上自动驾驶的商业化进程正在驶入“快车道”。 一方面&#xff0c;高阶自动驾驶的相关法规及标准不断出台&#xff0c;为自动驾驶行业的发展注入了“强心剂”。 比如工业和信息化部副部长辛国斌就曾表示&#xff0c;将启动智能网联汽车准入和上路通行试点&#xff0c;…

SQL实践语句:筛选表中异常数据!关键词:EXISTS

语句示例 SELECT COUNT(1) FROM(SELECT T.CUSTOMERCODE,T.CUSTOMERNAME,T.RECSTS,T.INDATTRODE,T.COUNTRYCODE,T.SAFECODE,T.REGIONCODE,T.ECONTYPECODEFROM WHJH.TBL_CODECUSTOMER_NEW T WHERET.BATCHNO>(SELECT BATCHNO FROM WHJH.TBL DATAFILE_MAKE_BATCHNO) -6 ) A WHE…

【云原生】k8s之包管理器Helm

前言 每个成功的软件平台都有一个优秀的打包系统&#xff0c;比如Debian、Ubuntu 的 apt&#xff0c;RedHat、CentOS 的 yum。Helm 则是 Kubernetes上 的包管理器&#xff0c;方便我们更好的管理应用。 1.Helm的相关知识 1.1 Helm的简介与了解 Helm本质就是让K8s的应用管理&…

PostgreSQL 的就业前景如何?

PostgreSQL的就业前景非常广阔&#xff0c;它是一种功能强大、可靠且开源的关系型数据库管理系统。以下是说明PostgreSQL就业前景的几个关键点&#xff1a; 1.高需求&#xff1a;随着企业和组织对数据存储和管理的需求不断增长&#xff0c;对数据库专业人员的需求也在持续上升…

Python 算法基础篇之数组和列表:创建、访问、添加和删除元素

Python 算法基础篇之数组和列表&#xff1a;创建、访问、添加和删除元素 引用 1. 数组的概念和创建2. 列表的概念和创建3. 访问数组和列表中的元素4. 添加和删除元素 a ) 添加元素 b ) 删除元素 总结 引用 在算法和数据结构中&#xff0c;数组和列表是常见的数据结构&#xff…

使用matlab给信号添加某一信噪比的噪声

在MATLAB中&#xff0c;你可以使用awgn函数给信号添加高斯白噪声来实现给矩阵信号添加特定信噪比的噪声&#xff0c;并使用plot函数可视化添加噪声前后的信号。以下是示例代码&#xff1a; % 创建原始信号 Fs 1000; % 采样率 t 0:1/Fs:1-1/Fs; % 时间轴 signal sin(2*pi*…

Tomcat工作原理

一、Tomcat架构 ### 说明&#xff1a; Server&#xff1a;表示整个 Tomcat Catalina servlet 容器&#xff0c;Server 中可以有多个 Service。&#xff08;可以通过telenet 8005后连接后输入“SHUTDOWN” 注意这里是大写&#xff0c;来关闭服务&#xff09;Service&#xff1…

Microsoft Update Assistant导致 MAC 电脑内存占用过高解决方案

目录 问题: 排查原因: 解决方案: 问题: 一直很苦恼,每次开机隔会发下电脑内存就 100%了,这次找了下原因,也记录下. 排查原因: 通过 mac 自带的活动监视器,发现居然是Microsoft Update Assistant它导致的 解决方案: 那这样就简单了,这个应该是 word,execl 的一个自动更新程序…

Spring 事务控制

1. 编程式事务控制相关对象 1.1 平台事务管理器 1.2 事务定义对象 1.3 事务状态对象 关系&#xff1a; PlatformTransactionManager TransactionManager TransactionStatus 2. 基于XML的声明式事务控制 切点&#xff1a;&#xff08;目标对象&#xff09;业务方法&#xff…

微派前端一面

1.挑一个你在项目中遇到比较有挑战的问题&#xff0c;如何去解决的 2.开发小程序的过程&#xff0c;有没有遇到一些性能问题或技术问题 3.最近关注哪些技术社区的动态&#xff0c;哪些技术的发展 这边我自己回答了tsvue3&#xff0c;小程序的taro 4.vue3相对于vue2升级了哪些…

OpenCv之Canny

目录 一、自适应阈值 二、边缘检测Canny 一、自适应阈值 引入前提:在前面的部分我们使用是全局闻值&#xff0c;整幅图像采用同一个数作为闻值。当时这种方法并不适应与所有情况&#xff0c;尤其是当同一幅图像上的不同部分的具有不同亮度时。这种情况下我们需要采用自适应闻…

C# OpenCvSharp 直方图均衡化 图像去雾

直方图 直方图均衡化 自适应的直方图均衡化 全局直方图均衡化 局部直方图均衡化 对比度调整 代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using Sy…

手打 小份 kubernetes v1.27.3 集群

文章目录 1. 准备2. yum3. 安装 ansible4. 互信5. hosts6. 关闭防火墙、swap、selinux7. 配置系统文件句柄数8. 启用ipvs9. 修改内核参数10. 安装 containerd11. 安装nerdctl12. kubernetes yum13. 部署 kubernetes13.1 安装工具13.2 初始化配置 14. 部署 master15. 部署 node1…