美文网首页
springboot2.2.6.RELEASE chapter1

springboot2.2.6.RELEASE chapter1

作者: 淼哥1986 | 来源:发表于2020-04-04 09:25 被阅读0次

官网地址:
https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/appendix-application-properties.html#core-properties

常见的配置:
配置 默认值 描述
server.port 8080 默认端口号
server.servlet.context-path Context path of the application.
spring.profiles.active Comma-separated list of active profiles. Can be overridden by a command line switch.
mybatis.mapper-locations mybaits mapper扫描路径,例如 classpath:sqlMap/.xml
logging.level.* 日志等级 例如logging.level.root=INFO
logging.config 日志文件路径 例如classpath:log4j2-dev.xml
spring.datasource.driver-class-name 数据源地址
spring.datasource.url url
spring.datasource.username 账号
spring.datasource.password 密码
spring.mvc.static-path-pattern 静态资源扫描pattern
spring.resources.static-locations 静态资源路径
在命令行中的使用方法:

java -jar main.jar --server.port=9000

相关文章

网友评论

      本文标题:springboot2.2.6.RELEASE chapter1

      本文链接:https://www.haomeiwen.com/subject/lbrdphtx.html