在SpringMVC的配置文件中<mvc:annotation-driven ⼀>应该写在哪个配置文件中

写的时候怎么老是报错呢,是不是缺少jar包啊
2024-11-28 10:03:14
推荐回答(2个)
回答1:

没有添加mvc的头

回答2:

在bean.xml中进行定义的,主要是为了说明那些类方法使用事物。
如:
举例:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">








class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

classpath:jdbc.properties






class="org.apache.commons.dbcp.BasicDataSource">






class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">





com/bluedot/bookAdministrate/entity/BorrowBooks.hbm.xml
com/bluedot/bookAdministrate/entity/Books.hbm.xml






org.hibernate.dialect.Oracle10gDialect
true
create



class="org.springframework.orm.hibernate3.HibernateTransactionManager">










id="myPonitcut1" />