|
|
@ -19,34 +19,4 @@ public class RuoYiApplication
|
|
|
|
SpringApplication.run(RuoYiApplication.class, args);
|
|
|
|
SpringApplication.run(RuoYiApplication.class, args);
|
|
|
|
System.out.println("(♥◠‿◠)ノ゙ ---tongue---启动成功 ლ(´ڡ`ლ)゙ ");
|
|
|
|
System.out.println("(♥◠‿◠)ノ゙ ---tongue---启动成功 ლ(´ڡ`ლ)゙ ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
|
|
|
public TomcatServletWebServerFactory servletContainer() { //springboot2 新变化
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
protected void postProcessContext(Context context) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SecurityConstraint securityConstraint = new SecurityConstraint();
|
|
|
|
|
|
|
|
securityConstraint.setUserConstraint("CONFIDENTIAL");
|
|
|
|
|
|
|
|
SecurityCollection collection = new SecurityCollection();
|
|
|
|
|
|
|
|
collection.addPattern("/*");
|
|
|
|
|
|
|
|
securityConstraint.addCollection(collection);
|
|
|
|
|
|
|
|
context.addConstraint(securityConstraint);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
tomcat.addAdditionalTomcatConnectors(initiateHttpConnector());
|
|
|
|
|
|
|
|
return tomcat;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Connector initiateHttpConnector() {
|
|
|
|
|
|
|
|
Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
|
|
|
|
|
|
|
|
connector.setScheme("http");
|
|
|
|
|
|
|
|
connector.setPort(8888);
|
|
|
|
|
|
|
|
connector.setSecure(false);
|
|
|
|
|
|
|
|
connector.setRedirectPort(9080);
|
|
|
|
|
|
|
|
return connector;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|