Не найден обработчик для запроса портлета: режим 'представление', фаза 'RENDER_PHASE', карта параметров[[пусто]]

На этот вопрос уже есть ответ здесь но я проверил, и компонент: сканирование настроен правильно для меня, поэтому я действительно не понимаю, в чем здесь смысл. Контроллер:

@Controller
@RequestMapping("view")
public class PortletController {

@RenderMapping
    public String view(RenderRequest request, RenderResponse response, ModelMap model) {
        ResourceURL baseResourceUrl = response.createResourceURL();

        model.addAttribute("ajaxURL", baseResourceUrl.toString() + "&");
        model.addAttribute("standalone", false);
        model.addAttribute("portletId", getPortletId(request));
        model.addAttribute("portletAppContextPath", request.getContextPath() + "/");

        return "index";
    }

Элемент сканирования компонента в контексте приложения:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.2.xsd">

    <!-- DispatcherPortlet Context: defines this portlet's request-processing infrastructure -->

    <!-- Autodetect annotated controllers -->

    <context:component-scan base-package="com.package.of.controller"/>
</beans>

Любая идея, почему это может не работать?


person softwareplay    schedule 11.05.2016    source источник