- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
- springboot2.2.6.RELEASE chapter1
常见的配置:
配置 | 默认值 | 描述 |
---|---|---|
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
网友评论