Spring boot pom 配置集合
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | < project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> < modelVersion >4.0.0 < parent > < groupId >org.springframework.boot < artifactId >spring-boot-starter-parent < version >2.7.5 < relativePath /> < groupId >com.example < artifactId >daytask < version >0.0.1-SNAPSHOT < name >com.daytask < description >com.daytask < properties > < java.version >1.8 < dependencies > < dependency > < groupId >org.springframework.boot < artifactId >spring-boot-starter-mail < dependency > < groupId >org.springframework.boot < artifactId >spring-boot-starter-validation < dependency > < groupId >org.springframework.boot < artifactId >spring-boot-starter-web < dependency > < groupId >org.mybatis.spring.boot < artifactId >mybatis-spring-boot-starter < version >2.2.2 < dependency > < groupId >org.springframework.boot < artifactId >spring-boot-devtools < scope >runtime < optional >true < dependency > < groupId >mysql < artifactId >mysql-connector-java < scope >runtime < dependency > < groupId >org.springframework.boot < artifactId >spring-boot-starter-test < scope >test < dependency > < groupId >com.alibaba < artifactId >druid < version >1.1.10 < dependency > < groupId >commons-fileupload < artifactId >commons-fileupload < version >1.3.1 < dependency > < groupId >commons-lang < artifactId >commons-lang < version >2.5 < dependency > < groupId >com.alibaba < artifactId >easyexcel < version >2.2.6 < dependency > < groupId >ws.schild < artifactId >jave-all-deps < version >2.5.1 < dependency > < groupId >com.baomidou < artifactId >mybatis-plus-boot-starter < version >3.4.1 < dependency > < groupId >org.projectlombok < artifactId >lombok < version >1.18.4 < scope >provided < build > < plugins > < plugin > < groupId >org.springframework.boot < artifactId >spring-boot-maven-plugin |
server.port=8087 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=root spring.datasource.password=123456 spring.datasource.url=jdbc:mysql://localhost:3306/mybatis?serverTimezone=GMT%2B8 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.initialSize=5 spring.datasource.minIdle=5 spring.datasource.maxActive=20 spring.datasource.maxWait=60000 spring.datasource.timeBetweenEvictionRunsMillis=60000 spring.datasource.minEvictableIdleTimeMillis=300000 spring.datasource.validationQuery=SELECT 1 FROM DUAL spring.datasource.testWhileIdle=true spring.datasource.testOnBorrow=false spring.datasource.testOnReturn=false spring.datasource.poolPreparedStatements=true #这里是mysql中的时间切换 spring.jackson.date-format=yyyy-MM-dd spring.jackson.time-zone=GMT+8 spring.jackson.serialization.write-dates-as-timestamps=false #查看mybatis sql语句 mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl #开启mysql 字段_自动映射到java驼峰标记上面 java驼峰的属性自动写到mysql中的下划线 mybatis.configuration.map-underscore-to-camel-case=true
如果在spring boot 里使用mybatis映射,要在application.properties 加上以下两条
mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.type-aliases-package=com.example.demo.entity
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix