SpringBoot——基础配置
目录 Tomcat配置 profile application-dev.properties apllication-test.properties application-pro.properties @ Tomcat配置 在Springboot项目中,可以内置tomcat、netty等容器。当添加了spring-boot-stater-web依赖之后,默认使用tomcat作为web容器。如果需要对tomcat进一步配置,可以在application.properties中进行配置。 server.port=8080 //web容器端口号 server.error.path=/error //当前项目出错的时候跳转页面 server.servlet.session.timeout=30m //配置了session的实效时间,m为分钟单位,默认单位为s server.servlet.context-path=/index //项目名称,默认为/ server.tomcat.uri-encoding=utf-8 // tomcat请求编码 server.tomcat.max-threads=500 // tomcat最大线程数 server.tomcat.basedir=/home/sang/tmp //tomcat运行日志和临时文件的存放目录 profile 在项目开发的时候