首页 > 编程语言 > 详细

idea搭建springboot项目(一)

时间:2020-07-30 10:04:28      阅读:76      评论:0      收藏:0      [点我收藏+]

 

第一步:先创建父工程

 

1、Create New Project 或File>New>Project...

 

技术分享图片

 

 

 

 

技术分享图片

 

 

 

2、选择Spring Initializr,然后点击Next

 

技术分享图片

 

 

 

3、输入Group与Artifact,其中GroupId为域.公司名,Artifact为项目名 ,Java Version选 8 ,然后点击Next

 

技术分享图片

 

 

 

4、父工程的Dependencies暂时不需要选择,根据后续实际情况引入即可,所以在这里直接点击Next进入到下一步。

 

技术分享图片

 

 

 

5、填写项目名以及保存的项目路径,然后点击Finish

 

技术分享图片

 

 

 

6、新建完成父工程之后将多余的文件和文件夹删除

 

技术分享图片

 

 

 

技术分享图片

 

 

 

7、配置pom文件,添加或将packaging更改为pom

 

<packaging>pom</packaging>

 

技术分享图片

 

 

 

第二步:先创建子工程

 

1、选中父模块,点击鼠标右键,然后点击New—>Module

 

技术分享图片

 

 

 

2、选择Spring Initializr,然后点击Next

 

技术分享图片

 

 

 

3、输入Group与Artifact,其中GroupId为域.公司名,Artifact为项目名 ,Java Version选 8 ,然后点击Next

 

技术分享图片

 

 

 

 

4、点击Next进入到下一步

 

技术分享图片

 

 

 

5、填写项目名,然后点击Finish

 

技术分享图片

 

 

 

6、新建完成子工程

 

技术分享图片

 

 

 

7、父模块的pom.xml,在其中modules下加入刚才创建的子模块

 

<modules>
<module>crawler-autohome</module>
</modules>

 

技术分享图片

 

 

 

8、子模块的pom.xml文件,将其中parent更改为对应父模块的信息

 

<parent>
<!--<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.2.RELEASE</version>
<relativePath/>--> <!-- lookup parent from repository -->
<groupId>cn.zj</groupId>
<artifactId>crawler</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

 

技术分享图片

 

 

 

 

 

报错NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget

解决办法:
在pom.xml中加入

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>4.3.12.RELEASE</version>
</dependency>

 

idea搭建springboot项目(一)

原文:https://www.cnblogs.com/zj68/p/13401580.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!