#端口号
server.port=8090
#项目路径
server.Context-path=/
#前缀
spring.mvc.view.prefix=/WEB-INF/views/
#后缀
spring.mvc.view.suffix=.jsp
#数据库类型
spring.jpa.database = MYSQL
#数据库
spring.datasource.url = jdbc:mysql://localhost:3306/jtdb?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true
#用户名
spring.datasource.username =root
#密码
spring.datasource.password =root
#数据库连接驱动
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#数据库初始连接为1
spring.datasource.druid.initial-size=1
#数据库最小连接为1
spring.datasource.druid.min-idle=1
#数据库最大连接为20
spring.datasource.druid.max-active=20
spring.datasource.druid.test-on-borrow=true
spring.datasource.druid.stat-view-servlet.allow=true
#映射到com.jt.manage.pojo包
mybatis.typeAliasesPackage=com.jt.manage.pojo
#引用mappers下面所有后缀名为xml的文件
mybatis.mapperLocations=classpath:mappers/*.xml
mybatis.configuration.mapUnders
SpringBoot中的全局配置application.properties详解
最新推荐文章于 2022-12-03 16:24:00 发布
本文详细探讨了SpringBoot应用中不可或缺的全局配置文件`application.properties`,包括其作用、常用配置项解析以及如何自定义配置。通过实例解析,帮助读者深入理解如何在SpringBoot项目中有效管理和使用这些配置,提升开发效率。
摘要由CSDN通过智能技术生成