作者:丁可丁可_136 | 来源:互联网 | 2023-09-17 19:48
篇首语:本文由编程笔记#小编为大家整理,主要介绍了SpringMVC学习笔记相关的知识,希望对你有一定的参考价值。
在springmvc.xml中引用业务层的Bean
beans.xml
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
expression="org.springframework.stereotype.Controller"/>
expression="org.springframework.web.bind.annotation.ControllerAdvice"/>
springmvc.xml
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
expression="org.springframework.stereotype.Controller"/>
expression="org.springframework.web.bind.annotation.ControllerAdvice"/>