RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
如何在idea中搭建springboot项目

这篇文章主要介绍“如何在idea中搭建springboot项目”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“如何在idea中搭建springboot项目”文章能帮助大家解决问题。

创新互联公司专注于信宜网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供信宜营销型网站建设,信宜网站制作、信宜网页设计、信宜网站官网定制、微信小程序开发服务,打造信宜网络公司原创品牌,更为您提供信宜网站排名全网营销落地服务。

一.在你建立的工程下创建 Module 选择Spring initializr创建。

如何在idea中搭建springboot项目

二.在Type处选择: Maven Project(项目的构建工具)

如何在idea中搭建springboot项目

三.创建依赖时勾上web,mybatis,MySQL(这个看你个人需要吧,可以自主选择)

如何在idea中搭建springboot项目

如何在idea中搭建springboot项目

建立好的项目结构如下:

如何在idea中搭建springboot项目

相对应的pom.xml文件



  4.0.0
  com
  demo
  0.0.1-SNAPSHOT
  jar
  demo
  Demo project for Spring Boot
  
    org.springframework.boot
    spring-boot-starter-parent
    1.5.9.RELEASE
     
  
  
    UTF-8
    UTF-8
    1.8
  
  
    
      org.mybatis.spring.boot
      mybatis-spring-boot-starter
      1.3.1
    
    
      org.springframework.boot
      spring-boot-starter-web
    
    
      mysql
      mysql-connector-java
      runtime
    
    
      org.springframework.boot
      spring-boot-starter-test
      test
    
    
    
      com.mchange
      c3p0
      0.9.5.2
    
  
  
    
      
        org.springframework.boot
        spring-boot-maven-plugin
      
    
  

application.yml(项目建城时这个application文件的后缀名不叫yml,是官方推荐把后缀改成yml的,好处是代码有提示)

mybatis:
 mapper-locations: classpath:mapper/*.xml
 type-aliases-package: com.demo.pojo
#数据库连接池
spring: datasource: username: root password: sasa url: jdbc:mysql://localhost:3306/ssm driver-class-name: com.mysql.jdbc.Driver

启动

如何在idea中搭建springboot项目

关于“如何在idea中搭建springboot项目”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注创新互联行业资讯频道,小编每天都会为大家更新不同的知识点。


标题名称:如何在idea中搭建springboot项目
分享网址:http://cqwzjz.cn/article/ijddjj.html