1 springmvc-servlet.xml中一般需要添加<mvc:annotation-driven></mvc:annotation-driven>注解驅動,但是在applicationContext.xml卻不需要,
並且把springmvc-servlet.xml的配置放到applicationContext.xml中依然需要注解驅動
2 這說明了<mvc:annotation-driven></mvc:annotation-driven>注解驅動是針對controller層,而applicationContext.xml中
<context:component-scan base-package=""></context:component-scan>會自動加載驅動,但是不包括controller層的注解驅動
3 因此當有controller層的注解時就需要<mvc:annotation-driven></mvc:annotation-driven>注解驅動,而controller層一般在springmvc.xml中配置,
因此會添加這個驅動
