application.properties配置文件


#修改tomcat的端口号
server.port=8080

#config view resolver配置前端视图解析器
spring.mvc.view.prefix=/pages/
#spring.mvc.view.suffix=.jsp

#config static resources配置静态资源访问
spring.mvc.static-path-pattern=/static/**

# 可以让浏览器直接访问到html

spring.resources.static-locations:classpath:/static/,classpath:/templates/

 

#数据库连接

spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=sa
spring.datasource.password=123
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

#mybatis下划线与驼峰互相转换

mybatis.configuration.map-underscore-to-camel-case=true

#mybatis 配置
# 配置映射文件加载
mybatis.mapper-locations=classpath*:mappers/*.xml
# 实体类通过别名使用
#mybatis.type-aliases-package=com.example.springboot.mybatis.entity

#时间戳统一转换
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8

#设置为true时,后定义的bean会覆盖之前定义的相同名称的bean。
#spring.main.allow-bean-definition-overriding=true


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM