Можно ли повторно использовать предопределенные контроллеры, такие как SimpleFormController, с настроенными для аннотации проектами Spring mvc?
Я скачал проект, который выглядит так, как я хочу; однако автор не использовал аннотации, предопределенные в Spring.
Контроллер скачанного проекта:
package net.sourceforge.sannotations.example2;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sourceforge.sannotations.annotation.Bean;
import net.sourceforge.sannotations.annotation.UrlMapping;
/**
* User: Urubatan Date: 24/10/2006 Time: 08:49:09
*/
@Bean
@UrlMapping("/test")
public class ExampleController implements Controller {
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
return new ModelAndView("example", "message", request.getParameter("tainted"));
}
}
Проект загружен с SourceForge