Spring Boot Tomcat Configuration, migration from container to embedded

后端 未结 2 972
臣服心动
臣服心动 2021-01-18 04:18

I\'m migrating a Spring boot application that used to run in the Tomcat container to a Spring Boot application that runs an embedded Tomcat. My old Tomcat configuration has

相关标签:
2条回答
  • 2021-01-18 04:41
    connector.setProperty("socket.appReadBufSize", "87380");
    connector.setProperty("socket.rxBufSize", "87380");
    connector.setProperty("socket.performanceConnectionTime", "2");
    connector.setProperty("socket.performanceLatency", "0");
    connector.setProperty("socket.performanceBandwidth", "1");
    connector.setProperty("server", "My server");
    

    Worked great. However it's important to check the return value of the connector.setProperty. It's trying to find the right method to call for every property, and returns true if the method was found and the property was set. Unfortunately connector.setProperty("useComet", Boolean.toString(false)); did not work, and returned false.

    0 讨论(0)
  • 2021-01-18 04:49

    Try this:

    connector.setProperty("useComet", Boolean.toString(false));
    connector.setProperty("socket.appReadBufSize", "87380");
    connector.setProperty("socket.rxBufSize", "87380");
    connector.setProperty("socket.performanceConnectionTime", "2");
    connector.setProperty("socket.performanceLatency", "0");
    connector.setProperty("socket.performanceBandwidth", "1");
    connector.setProperty("server", "My server");
    
    0 讨论(0)
提交回复
热议问题