@@ -0,0 +1,1329 @@
+package de.terrestris.shogun2.rest;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Qualifier;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0Aimport de.terrestris.shogun2.dao.RoleDao;%0Aimport de.terrestris.shogun2.model.Role;%0Aimport de.terrestris.shogun2.service.RoleService;%0A%0A/**%0A * @author Andre Henn%0A *%0A */%0A@RestController%0A@RequestMapping(%22/roles%22)%0Apublic class RoleRestController%3CE extends Role, D extends RoleDao%3CE%3E, S extends RoleService%3CE, D%3E%3E%0A%09%09extends AbstractRestController%3CE, D, S%3E %7B%0A%0A%09/**%0A%09 * Default constructor, which calls the type-constructor%0A%09 */%0A%09@SuppressWarnings(%22unchecked%22)%0A%09public RoleRestController() %7B%0A%09%09this((Class%3CE%3E) Role.class);%0A%09%7D%0A%0A%09/**%0A%09 * Constructor that sets the concrete entity class for the controller.%0A%09 * Subclasses MUST call this constructor.%0A%09 */%0A%09protected RoleRestController(Class%3CE%3E entityClass) %7B%0A%09%09super(entityClass);%0A%09%7D%0A%0A%09/**%0A%09 * We have to use %7B@link Qualifier%7D to define the correct service here.%0A%09 * Otherwise, spring can not decide which service has to be autowired here%0A%09 * as there are multiple candidates.%0A%09 */%0A%09@Override%0A%09@Autowired%0A%09@Qualifier(%22roleService%22)%0A%09public void setService(S service) %7B%0A%09%09this.service = service;%0A%09%7D%0A%7D%0A

add rest controller for role entity