Skip to content

Commit

Permalink
(fix) use setWebApplicationType
Browse files Browse the repository at this point in the history
Removes deprecation
  • Loading branch information
trajano committed Mar 9, 2018
1 parent 88da410 commit 7ab9d23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ms-common/src/main/java/net/trajano/ms/Microservice.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import org.springframework.boot.Banner.Mode;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;

import net.trajano.ms.spi.MicroserviceEngine;

Expand Down Expand Up @@ -86,7 +87,7 @@ public static void run(final Class<? extends Application> applicationClass,
System.arraycopy(bootstrapObjects, 0, sources, extraSources.length, bootstrapObjects.length);

final SpringApplication springApplication = new SpringApplication(sources);
springApplication.setWebEnvironment(false);
springApplication.setWebApplicationType(WebApplicationType.NONE);
springApplication
.setBannerMode(Mode.OFF);
springApplication.run(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.Banner.Mode;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;

Expand All @@ -28,7 +29,7 @@ public static void main(final String[] args) {

final SpringApplication application = new SpringApplication(GatewayMS.class);
application.setBannerMode(Mode.OFF);
application.setWebEnvironment(false);
application.setWebApplicationType(WebApplicationType.NONE);
application.run(args);

}
Expand Down

0 comments on commit 7ab9d23

Please sign in to comment.