From 2e09bc9b75fe03c246b0dab98f9d6fce2baa9a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cocula?= Date: Wed, 14 Dec 2016 00:24:58 +0100 Subject: [PATCH] WIP Spring Boot --- libresonic-main/pom.xml | 25 +++++++++++---- .../libresonic/player/boot/Application.java | 8 +++++ .../applicationContext-cache.xml | 0 .../applicationContext-security.xml | 32 +++++++++---------- .../applicationContext-service.xml | 0 .../applicationContext-sonos.xml | 0 .../libresonic-servlet.xml | 0 7 files changed, 43 insertions(+), 22 deletions(-) rename libresonic-main/src/main/{webapp/WEB-INF => resources}/applicationContext-cache.xml (100%) rename libresonic-main/src/main/{webapp/WEB-INF => resources}/applicationContext-security.xml (73%) rename libresonic-main/src/main/{webapp/WEB-INF => resources}/applicationContext-service.xml (100%) rename libresonic-main/src/main/{webapp/WEB-INF => resources}/applicationContext-sonos.xml (100%) rename libresonic-main/src/main/{webapp/WEB-INF => resources}/libresonic-servlet.xml (100%) diff --git a/libresonic-main/pom.xml b/libresonic-main/pom.xml index 949a389a..df895f37 100644 --- a/libresonic-main/pom.xml +++ b/libresonic-main/pom.xml @@ -30,23 +30,23 @@ ${project.version} - + io.dropwizard.metrics metrics-core ${metrics.version} test + - + org.springframework.boot spring-boot-starter-web - - javax.servlet - jstl - org.springframework.boot spring-boot-starter-tomcat @@ -69,7 +69,20 @@ org.springframework.security spring-security-ldap + + + + javax.servlet + jstl + 1.2 + + + taglibs + string + 1.1.0 + + org.apache.lucene 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 56c1633a..297e3e6d 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 @@ -4,8 +4,16 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ImportResource; @SpringBootApplication +@Configuration +@ImportResource(value = {"classpath:/applicationContext-service.xml", + "classpath:/applicationContext-cache.xml", + "classpath:/applicationContext-sonos.xml", + "classpath:/applicationContext-security.xml", + "classpath:/libresonic-servlet.xml"}) public class Application extends SpringBootServletInitializer { @Override diff --git a/libresonic-main/src/main/webapp/WEB-INF/applicationContext-cache.xml b/libresonic-main/src/main/resources/applicationContext-cache.xml similarity index 100% rename from libresonic-main/src/main/webapp/WEB-INF/applicationContext-cache.xml rename to libresonic-main/src/main/resources/applicationContext-cache.xml diff --git a/libresonic-main/src/main/webapp/WEB-INF/applicationContext-security.xml b/libresonic-main/src/main/resources/applicationContext-security.xml similarity index 73% rename from libresonic-main/src/main/webapp/WEB-INF/applicationContext-security.xml rename to libresonic-main/src/main/resources/applicationContext-security.xml index e8fe29a1..2bb5347a 100644 --- a/libresonic-main/src/main/webapp/WEB-INF/applicationContext-security.xml +++ b/libresonic-main/src/main/resources/applicationContext-security.xml @@ -8,21 +8,21 @@ http://www.springframework.org/schema/security/spring-security.xsd"> - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -55,7 +55,7 @@ - + diff --git a/libresonic-main/src/main/webapp/WEB-INF/applicationContext-service.xml b/libresonic-main/src/main/resources/applicationContext-service.xml similarity index 100% rename from libresonic-main/src/main/webapp/WEB-INF/applicationContext-service.xml rename to libresonic-main/src/main/resources/applicationContext-service.xml diff --git a/libresonic-main/src/main/webapp/WEB-INF/applicationContext-sonos.xml b/libresonic-main/src/main/resources/applicationContext-sonos.xml similarity index 100% rename from libresonic-main/src/main/webapp/WEB-INF/applicationContext-sonos.xml rename to libresonic-main/src/main/resources/applicationContext-sonos.xml diff --git a/libresonic-main/src/main/webapp/WEB-INF/libresonic-servlet.xml b/libresonic-main/src/main/resources/libresonic-servlet.xml similarity index 100% rename from libresonic-main/src/main/webapp/WEB-INF/libresonic-servlet.xml rename to libresonic-main/src/main/resources/libresonic-servlet.xml