문제

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.?

도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top