Spring boot mvc listening port issu

when using spring boot embedded server development, we all specify the port for web listening through server.port . Is there any way to enable a spring boot project to use multiple ports to listen for requests, for example, both 80 and 81 can receive requests at the same time.


configure in startup class

@Bean
public EmbeddedServletContainerCustomizer containerCustomizer() {
    return new EmbeddedServletContainerCustomizer() {
        @Override
        public void customize(ConfigurableEmbeddedServletContainer container) {
            if (container instanceof TomcatEmbeddedServletContainerFactory) {
                TomcatEmbeddedServletContainerFactory containerFactory =
                        (TomcatEmbeddedServletContainerFactory) container;

                Connector connector = new Connector(TomcatEmbeddedServletContainerFactory.DEFAULT_PROTOCOL);
                connector.setPort(8080);
                containerFactory.addAdditionalTomcatConnectors(connector);
                
                Connector connector2 = new Connector(TomcatEmbeddedServletContainerFactory.DEFAULT_PROTOCOL);
                connector2.setPort(9090);
                containerFactory.addAdditionalTomcatConnectors(connector2);
            }
        }
    };
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5930f-5a55d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5930f-5a55d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?