2
I am developing various services and these are run at port 8080 by Tomcat.
Since the next services to be generated are unrelated to the services that have already been generated, it was requested that the port be modified.
I found the class TomcatEmbeddedServletContainerFactory
that modifies the Tomcat port by java.
I made this code to modify the port:
public class TestContext {
@Bean
public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory factory = new TomcatEmbeddedServletContainerFactory();
factory.setPort(2020);
factory.addInitializers();
return factory;
}
}
The service runs normally and the port is being modified, only the mapping of the services is not being done.
I wanted an example of how to use this class to do the mapping. At least which method I have to use to do the mapping.