[英]@RequestMapping without @Controller annotation
Is it possible to use @RequestMapping annoation in controller class without the use of @Controller annotation for controller class i will register the bean i am asking this coz @Controller class if i deploy as jar file it not working properly so any help?
您需要<context:component-scan base-package="com.yourpackage" />
來激活注釋。
至於問題 - 您的 bean 應該是 controller 以便有資格進行請求映射。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.