<!-- 启用注解 -->
<context:annotation-config />
<context:component-scan base-package="com.csh.project" /> 该注解包含了第一个注解的功能,使用该注解就无需使用第一个注解了。
<context:component-scan base-package="com.n22.tawm">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
applicationContext.xml 加载 exclude(除了control都扫描)
<context:property-placeholder
ignore-unresolvable="true"
location="classpath:jdbc.properties,classpath:application.properties,classpath:testservice.properties" />
扫描classpath路径下面的文件,通过${}可以直接使用。 ignore-unresolvable="true"可以加载多个文件
8044

被折叠的 条评论
为什么被折叠?



