springboot配置列表
时间: 2023-10-25 19:40:11 浏览: 33
以下是Spring Boot中常见的配置列表:
1. 应用程序配置
- server.port:指定应用程序的端口号
- server.context-path:指定应用程序的上下文路径
- spring.application.name:指定应用程序的名称
- spring.profiles.active:指定活动的Spring配置文件
2. 数据源配置
- spring.datasource.url:指定数据库的URL
- spring.datasource.username:指定数据库的用户名
- spring.datasource.password:指定数据库的密码
- spring.datasource.driver-class-name:指定数据库驱动程序类名
3. 缓存配置
- spring.cache.type:指定缓存类型(如ehcache、redis、caffeine等)
- spring.cache.cache-names:指定缓存名称
4. 日志配置
- logging.level.root:指定根日志的级别
- logging.level.<logger-name>:指定特定日志记录器的级别
- logging.file:指定日志文件的路径
5. 安全配置
- spring.security.user.name:指定默认用户的用户名
- spring.security.user.password:指定默认用户的密码
6. 其他配置
- spring.mvc.view.prefix:指定视图文件的前缀
- spring.mvc.view.suffix:指定视图文件的后缀
- spring.resources.static-locations:指定静态资源的位置
- spring.jackson.date-format:指定日期格式
以上是一些常见的Spring Boot配置列表,具体还要根据具体的应用场景进行相应的配置。