安裝:web
配置:spring
<role rolename="admin-gui"/> #admin gui用戶 <role rolename="manager-gui」/> #manager gui用戶 <user username="admin" password="admin" roles=" admin-gui , manager-gui "/>
<!—配置線程池--> <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads=「4」 maxIdleTime=「60000"/> <!--設置監聽端口,設置共享線程池提升性能--> <!--設置爲nio protocol="org.apache.coyote.http11.Http11NioProtocol" --> <!--tomcat8之後默認爲nio --> <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" enableLookups=「false" redirectPort="8443" /> <!-- https配置 --> <Connector executor="tomcatThreadPool" port="443" protocol="HTTP/1.1" SSLEnabled=「true" scheme="https" secure="true" clientAuth="false" sslProtocol=「TLS" keystoreFile="conf/tomcat.keystore" keystorePass="123456"/> <!--設置war目錄以及部署屬性,能夠配置多個Host對應多個域名綁定--> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
<filter> <filter-name>CorsFilter</filter-name> <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> </filter> <filter-mapping> <filter-name>CorsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>