0

The answer to about spring boot how to disable web environment correctly no longer works, as the method .setWebEnvironment() is gone.

What is the current, 2.0 way to disable web support completely?

For instance, my web application also contains a utility class that's used doing deployments, and needs to execute main() without firing up the web app.

More specifically about the behaviour I want to avoid, I see this in the log:

2019-09-25 11:48:12.151  INFO 19832 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.17]
2019-09-25 11:48:12.323  INFO 19832 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext

and also the utility class doesn't terminate, and also takes up port 8080 while it's running.

Alex R
  • 11,364
  • 15
  • 100
  • 180

0 Answers0