@Bean
    public ConfigurableServletWebServerFactory servletContainer() {
        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
            @Override
            protected void postProcessContext(final Context context) {
                SecurityConstraint securityConstraint = new SecurityConstraint();
                securityConstraint.setUserConstraint("CONFIDENTIAL");
                SecurityCollection collection = new SecurityCollection();
                collection.addPattern("/*");
                securityConstraint.addCollection(collection);
                context.addConstraint(securityConstraint);
            }
        };
        factory.addAdditionalTomcatConnectors(getHttpConnector());
        return factory;
    }
Servlet container configurable servlet web server factory.

@return the configurable servlet web server factory
shenyu-examples/shenyu-examples-https/src/main/java/org/apache/shenyu/examples/https/configuration/HttpsConfiguration.java