diff --git a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java index 6e05cc4a..fa8cfe93 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java +++ b/libresonic-main/src/main/java/org/libresonic/player/boot/Application.java @@ -11,6 +11,7 @@ import org.libresonic.player.filter.RequestEncodingFilter; import org.libresonic.player.filter.ResponseHeaderFilter; import org.libresonic.player.spring.AdditionalPropertySourceConfigurer; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.ServletRegistrationBean; @@ -19,7 +20,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; -@SpringBootApplication +@SpringBootApplication(exclude = {JmxAutoConfiguration.class}) @Configuration @ImportResource(value = {"classpath:/applicationContext-service.xml", "classpath:/applicationContext-cache.xml", @@ -149,14 +150,11 @@ public class Application extends SpringBootServletInitializer { // Customize the application or call application.sources(...) to add sources // Since our example is itself a @Configuration class (via @SpringBootApplication) // we actually don't need to override this method. - return application.sources(Application.class); + return application.sources(Application.class).web(true).initializers(new AdditionalPropertySourceConfigurer()); } public static void main(String[] args) { - new Application().configure(new SpringApplicationBuilder(Application.class)) - .web(true) - .initializers(new AdditionalPropertySourceConfigurer()) - .run(args); + new SpringApplicationBuilder(Application.class).run(args); } } \ No newline at end of file