Controllers migration.

master
Rémi Cocula 8 years ago
parent 8231a44089
commit 2c63e287df
  1. 14
      libresonic-main/src/main/java/org/libresonic/player/controller/AllmusicController.java
  2. 4
      libresonic-main/src/main/resources/libresonic-servlet.xml

@ -19,8 +19,11 @@
*/ */
package org.libresonic.player.controller; package org.libresonic.player.controller;
import org.springframework.web.servlet.*;
import org.springframework.web.servlet.mvc.*; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.*; import javax.servlet.http.*;
@ -29,10 +32,13 @@ import javax.servlet.http.*;
* *
* @author Sindre Mehus * @author Sindre Mehus
*/ */
public class AllmusicController extends ParameterizableViewController { @Controller
@RequestMapping("/allmusic")
public class AllmusicController {
@RequestMapping(method = RequestMethod.GET)
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
ModelAndView result = super.handleRequestInternal(request, response); ModelAndView result = new ModelAndView();
result.addObject("album", request.getParameter("album")); result.addObject("album", request.getParameter("album"));
return result; return result;
} }

@ -15,9 +15,6 @@
<mvc:annotation-driven /> <mvc:annotation-driven />
<context:component-scan base-package="org.libresonic.player.controller, org.libresonic.player.validator"/> <context:component-scan base-package="org.libresonic.player.controller, org.libresonic.player.validator"/>
<bean id="allmusicController" class="org.libresonic.player.controller.AllmusicController">
<property name="viewName" value="allmusic"/>
</bean>
<bean id="podcastChannelsController" class="org.libresonic.player.controller.PodcastChannelsController"> <bean id="podcastChannelsController" class="org.libresonic.player.controller.PodcastChannelsController">
<property name="viewName" value="podcastChannels"/> <property name="viewName" value="podcastChannels"/>
<property name="podcastService" ref="podcastService"/> <property name="podcastService" ref="podcastService"/>
@ -222,7 +219,6 @@
<prop key="/transcodingSettings.view">transcodingSettingsController</prop> <prop key="/transcodingSettings.view">transcodingSettingsController</prop>
<prop key="/internetRadioSettings.view">internetRadioSettingsController</prop> <prop key="/internetRadioSettings.view">internetRadioSettingsController</prop>
<prop key="/avatarUpload.view">avatarUploadController</prop> <prop key="/avatarUpload.view">avatarUploadController</prop>
<prop key="/allmusic.view">allmusicController</prop>
<prop key="/editTags.view">editTagsController</prop> <prop key="/editTags.view">editTagsController</prop>
<prop key="/avatar.view">avatarController</prop> <prop key="/avatar.view">avatarController</prop>
<prop key="/proxy.view">proxyController</prop> <prop key="/proxy.view">proxyController</prop>

Loading…
Cancel
Save