Question

does it scan for controller,service,dao,autowired annotations only? what is it's impact on RequestMapping, ResponseBody and other hibernate-annotations line Id,Table etc. If in my project i am not using any controller,service,dao,autowired annotations and using only RequestMapping,ResponseBody and Hibernate-annotations then is required in dispatcher xml or not.?

Was it helpful?

Solution

For your scenario, the answer is NO. It's sample. Since you do not add any Spring annotation on Class, it means the bean is not managed by Spring. So the Spring can not do anything on it. It's the same to the hibernate annotation.

And for Context:component-scan, I recommend you to open the context schema: http://www.springframework.org/schema/context/spring-context-3.0.xsd, it has description on it. Also note, for all of this kinds of config, please open the schema and check the description, it's very clear.

OTHER TIPS

No, it does a lot more than that.

For detailed description on component scanning please refer to these sections as starting point in reference page:

http://docs.spring.io/spring/docs/4.0.3.RELEASE/spring-framework-reference/htmlsingle/#beans-annotation-config

http://docs.spring.io/spring/docs/4.0.3.RELEASE/spring-framework-reference/htmlsingle/#beans-classpath-scanning

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top