提交 e2b399c9 authored 作者: zhangshuang's avatar zhangshuang

bug

package com.zjty.efs.union; package com.zjty.efs.union;
import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector; import org.apache.catalina.connector.Connector;
import org.apache.tomcat.util.descriptor.web.SecurityCollection;
import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
...@@ -29,19 +32,30 @@ public class UnionApplication { ...@@ -29,19 +32,30 @@ public class UnionApplication {
SpringApplication.run(UnionApplication.class, args); SpringApplication.run(UnionApplication.class, args);
} }
// @Bean @Bean
// public ServletWebServerFactory servletContainer() { public ServletWebServerFactory servletContainer() {
// TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
// tomcat.addAdditionalTomcatConnectors(createHTTPConnector()); @Override
// return tomcat; protected void postProcessContext(Context context) {
// } SecurityConstraint securityConstraint = new SecurityConstraint();
// securityConstraint.setUserConstraint("CONFIDENTIAL");
// private Connector createHTTPConnector() { SecurityCollection collection = new SecurityCollection();
// Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); collection.addPattern("/*");
// connector.setScheme("http"); securityConstraint.addCollection(collection);
// connector.setPort(8081); context.addConstraint(securityConstraint);
// connector.setSecure(false); }
// connector.setRedirectPort(8082); };
// return connector; tomcat.addAdditionalTomcatConnectors(createHTTPConnector());
// } return tomcat;
}
private Connector createHTTPConnector() {
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
connector.setScheme("http");
connector.setPort(8081);
connector.setSecure(false);
connector.setRedirectPort(8082);
connector.setMaxPostSize(100*1024*1024);
return connector;
}
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
server.port=8082 server.port=8082
logging.file=./log/efs.log logging.file=./log/efs.log
spring.main.allow-bean-definition-overriding=true #spring.main.allow-bean-definition-overriding=true
##连接中心数据库数据库mysql ##连接中心数据库数据库mysql
spring.datasource.url=jdbc:mysql://localhost:3306/ty_efs?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8 spring.datasource.url=jdbc:mysql://localhost:3306/ty_efs?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
...@@ -21,16 +21,15 @@ spring.jpa.open-in-view=true ...@@ -21,16 +21,15 @@ spring.jpa.open-in-view=true
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=100MB spring.servlet.multipart.max-request-size=100MB
#100MB
server.tomcat.max-http-form-post-size=-1
file.address=/Users/ljj/software/ftp file.address=/Users/ljj/software/ftp
# SSL config # SSL config
#server.ssl.key-store=classpath:3725333_filetransfer.products.zjtys.com.cn.pfx server.ssl.key-store=classpath:3725333_filetransfer.products.zjtys.com.cn.pfx
## 证书密码,请修改为您自己证书的密码. # 证书密码,请修改为您自己证书的密码.
#server.ssl.key-store-password=lR4072XF server.ssl.key-store-password=lR4072XF
## 秘钥库类型 # 秘钥库类型
#server.ssl.keyStoreType=PKCS12 server.ssl.keyStoreType=PKCS12
## 证书别名 # 证书别名
#server.ssl.keyAlias= alias server.ssl.keyAlias= alias
\ No newline at end of file \ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论