我可以在spring mvc中将所有类的包注册为控制器吗?

时间:2014-09-01 14:28:06

标签: java spring spring-mvc controller

我在我的项目中使用过" springmvc-router"从类定义中删除@RequestMapping注释。

同样,是否可以删除类定义中的@Controller和@Service注释?

此外,我的软件包com.test.controllers包括所有使用@Controller注释的contorllers和使用@Service注释的com.test.service.impl。

因此,com.test.controllers下的所有类都可以在没有@Controller的情况下注册为控制器吗?...服务注释也是如此。

0 个答案:

没有答案