Версия платформы 7.2.4
Версия rest аддона 7.2.0
-
Создал новый куба проект
-
Добавил аддон rest api
-
Добавил пользователю роль разрешающую использовать рест
-
Добавил в модуль web свой контроллер:
package com.company.resttest.rest; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("sign") public class SignController { @ResponseBody @RequestMapping(value = "/up", method = RequestMethod.POST) public String register() { return "my-response"; } }
-
Добавил файл rest-dispatcher-spring.xml
<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-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> <context:component-scan base-package="com.company.resttest.rest"/> </beans>
-
В web-app.properties добавил
cuba.restSpringContextConfig = +com/company/resttest/rest-dispatcher-spring.xml
-
В итоге при обращении к http://localhost:8080/app/rest/sign/up получаю 403 (запрос делаю при помощи cubaREST)
Я ожидал что авторизация не нужна так как в файле rest-dispatcher-spring.xml нет описания секьюрити. Хотелось бы как то запилить регистрацию через рест
Делал по вот этим докам
Вопрос что делаю не так?