打开idea,新建项目
修改项目名及包名
选择你要导入的依赖
确认项目名和项目位置,点击finish
随便写一个测试类,启动测试访问一波,一个简单的springboot项目就完成了
记录一下mybatis、sqlserver、MySQL的连接配置
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.cache=false
spring.jackson.time-zone=GMT+8
#mybatis
mybatis.type-aliases-package=com.test.bean,com.test.vo
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.configuration.map-underscore-to-camel-case=true
#mysql
#spring.datasource.url=jdbc:mysql://服务器地址:端口号/数据库名?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=GMT%2B8
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
#SqlServer
spring.datasource.url=jdbc:sqlserver://服务器地址:端口号;DatabaseName=数据库名
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.datasource.username=root
#spring.datasource.password=123456
spring.devtools.livereload.enabled=true
spring.devtools.livereload.port=35729
spring.devtools.restart.enabled=true