In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
How to use idea tools to create the first SpringBoot+Maven project, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. Work preparation:
(1) install jdk
(2) installed intellij idea tools
(3) install maven
two。 Configure maven in idea
(1) File-> Settings
3. Create a project
(1) File-> New
4. Configure the pom dependency package:
4.0.0org.springframework.bootspring-boot-starter-parent2.0.1.RELEASE com.exampledemo0.0.1-SNAPSHOTdemoDemo project for Spring Boot1.8org.springframework.bootspring-boot-starter-weborg.mybatis.spring.bootmybatis-spring-boot-starter1.3.2mysqlmysql-connector-javaruntimeorg.springframework.bootspring-boot-starter-testtestcom.fasterxml.jackson.corejackson-corecom.fasterxml.jackson.corejackson-databindcom.fasterxml.jackson.datatypejackson-datatype-jodacom.fasterxml.jackson.modulejackson-module-parameter-namescom.alibabadruid1.0.11org .springframework.bootspring-boot-maven-pluginorg.mybatis.generatormybatis-generator-maven-plugin1.3.2 ${basedir} / src/main/resources/generatorConfig.xmltruetrue
5. Configure the resource file for spring: application.yml
Server:
Port: 8082
Spring:
Datasource:
Name: test
Url: jdbc:mysql://127.0.0.1:3306/testDB
Username: root
Password: root
# using druid data sources
Type: com.alibaba.druid.pool.DruidDataSource
Driver-class-name: com.mysql.jdbc.Driver
Filters: stat
MaxActive: 20
InitialSize: 1
MaxWait: 60000
MinIdle: 1
TimeBetweenEvictionRunsMillis: 60000
MinEvictableIdleTimeMillis: 300000
ValidationQuery: select'x'
TestWhileIdle: true
TestOnBorrow: false
TestOnReturn: false
PoolPreparedStatements: true
MaxOpenPreparedStatements: 20
# # the configuration node is an independent node, and many students can easily put this configuration under the spring node, so that the configuration cannot be recognized
Mybatis:
Mapper-locations: classpath:mapping/*.xml # Note: be sure to correspond to the path of the mapper mapping xml file
Type-aliases-package: com.example.model # Note: the path of the corresponding entity class
After reading the above, have you learned how to create the first SpringBoot+Maven project through the idea tool? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.