spring:
datasource: # 数据库四大组件
schema-password: root
data-username: root
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/blogs?serverTimezone=UTC
server: #设置tomcat
port: 8888 #设置tomcat的端口号
servlet:
context-path: /springboot # 设置项目启动的根目录,这里面必须加上‘/’不然项目无法启动
tomcat:
uri-encoding: utf-8 #设置编码格式
此外还有以下:
server. Port = xxxx
server. Address =
server. contextPath =
server. displayName =
server. servletPath =
server. contextParameters =
server. useForwardHeaders =
server. serverHeader =
server. maxHttpHeaderSize =
server. maxHttpPostSize =
server. connectionTimeout =
server. session.timeout =
server. session.trackingModes =
server. session.persistent =
server.session.storeDir =
server.cookie. name =
server.cookie. domain =
server.cookie. path =
server.cookie. comment =
server.cookie. httpOnly =
server.cookie. secure =
server.cookie. maxAge =
server. ssl. Enabled =
server.ssl. clientAuth =
server.ssl. ciphers =
server.ssl. enabledProtocols =
server.ssl. keyAlias =
server.ssl. keyPassword =
server.ssl. keyStore =
server.ssl. keyStorePassword =
server.ssl. keyStoreType =
server.ssl. keyStoreProvider =
server.ssl. trustStore =
server.ssl. trustStorePassword =
server.ssl. trustStoreType =
server.ssl. trustStoreProvider =
server.ssl. protocol =
server.compression. enabled =
server.compression.mimeTypes =
server.compression.excludedUserAgents =
server.compression.minResponseSize =
server. jspServlet. className =
server.jspServlet. initParameters =
server.jspServlet.registered =
server.tomcat.accesslog.enabled =
server.tomcat.accesslog.pattern =
server.tomcat.accesslog.directory =
server.tomcat.accesslog.prefix =
server.tomcat.accesslog.suffix =
server.tomcat.accesslog.rotate =
server.tomcat.accesslog.renameOnRotate =
server.tomcat.accesslog.requestAttributesEnabled=
server.tomcat.accesslog.buffered =
server.tomcat.internalProxies =
server.tomcat.protocolHeader =
server.tomcat.protocolHeaderHttpsValue =
server.tomcat.portHeader =
server.tomcat.remoteIpHeader=
server.tomcat.basedir =
server.tomcat.backgroundProcessorDelay =
server.tomcat.maxThreads =
server.tomcat.minSpareThreads =
server.tomcat.maxHttpPostSize =
server.tomcat.maxHttpHeaderSize =
server.tomcat.redirectContextRoot =
server.tomcat.uriEncoding =
server.tomcat.maxConnections =
server.tomcat.acceptCount =
server.tomcat.additionalTldSkipPatterns =
注意:可以在yml文件中修改tomcat的各个配置,比如端口号或者线程数等