关于idea中的springboot项目配置maven仓库和插件下载加速

在Springboot里面的pom文件中加上

<!--maven仓库国内镜像-->
<repositories>
    <repository>
        <id>nexus-aliyun</id>
        <name>nexus-aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<!--idea插件国内镜像-->
<pluginRepositories>
    <pluginRepository>
        <id>public</id>
        <name>aliyun nexus</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以按照以下步骤在IDEA使用Maven创建Spring Boot项目: 1. 打开IDEA,点击 “Create New Project” 选择 Maven 并点击 “Next”。 2. 输入 GroupId、ArtifactId 和版本号,然后选择 “Create from archetype” 并选择 “org.apache.maven.archetypes:maven-archetype-quickstart”。 3. 在下一步,可以自定义项目名称和路径。 4. 在下一步,可以选择项目的 JDK 版本、默认的包等信息。 5. 在下一步,可以进一步配置 Maven 项目的选项,如指定 Maven 版本、本地仓库位置、代理设置等。 6. 点击 “Finish” 完成创建项目。 接下来,我们需要进行以下步骤来将创建的 Maven 项目转换为 Spring Boot 项目: 1. 在项目的 pom.xml 文件,添加 Spring Boot 的依赖,例如: ``` <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>2.5.2</version> </dependency> ``` 2. 在项目添加 Spring Boot 的启动类,例如: ``` @SpringBootApplication public class MyApplication { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); } } ``` 3. 编写 Spring Boot 的业务代码,例如: ``` @RestController public class MyController { @GetMapping("/hello") public String hello() { return "Hello, World!"; } } ``` 4. 启动 Spring Boot 项目,可以通过运行启动类的 main 方法或者使用 Maven 件来进行启动。 以上就是在 IDEA 使用 Maven 创建 Spring Boot 项目的基本步骤。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值