Signed-off-by: Andrew DeMaria <lostonamountain@gmail.com>
master
Andrew DeMaria 8 years ago
parent da9661ef58
commit fd9fd618af
No known key found for this signature in database
GPG Key ID: 0A3F5E91F8364EDF
  1. 10
      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.filter.ResponseHeaderFilter;
import org.libresonic.player.spring.AdditionalPropertySourceConfigurer; import org.libresonic.player.spring.AdditionalPropertySourceConfigurer;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean; 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.Configuration;
import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.ImportResource;
@SpringBootApplication @SpringBootApplication(exclude = {JmxAutoConfiguration.class})
@Configuration @Configuration
@ImportResource(value = {"classpath:/applicationContext-service.xml", @ImportResource(value = {"classpath:/applicationContext-service.xml",
"classpath:/applicationContext-cache.xml", "classpath:/applicationContext-cache.xml",
@ -149,14 +150,11 @@ public class Application extends SpringBootServletInitializer {
// Customize the application or call application.sources(...) to add sources // Customize the application or call application.sources(...) to add sources
// Since our example is itself a @Configuration class (via @SpringBootApplication) // Since our example is itself a @Configuration class (via @SpringBootApplication)
// we actually don't need to override this method. // 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) { public static void main(String[] args) {
new Application().configure(new SpringApplicationBuilder(Application.class)) new SpringApplicationBuilder(Application.class).run(args);
.web(true)
.initializers(new AdditionalPropertySourceConfigurer())
.run(args);
} }
} }
Loading…
Cancel
Save