正在回答 回答被采纳积分+1
5回答
MySweeties
2019-04-20 17:34:47
<?xml version="1.0" encoding="UTF-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" 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.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"> <context:component-scan base-package="com.vectory"/> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/book?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&useSSL=false"/> <property name="username" value="root"/> <property name="password" value="admin"/> </bean> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="typeAliasesPackage" value="com.vectory.entity"/> <property name="plugins"> <array> <bean class="com.github.pagehelper.PageInterceptor"/> </array> </property> </bean> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/> <property name="basePackage" value="com.vectory.dao"/> </bean> </beans>
MySweeties
2019-04-20 14:33:17
MySweeties
2019-04-19 16:13:40
除此之外,spring中加了<aop:aspectj-autoproxy/>这句话,就必须用到aop吗?我做作业的时候,没用到,结果报错了,说无法找到相关资源,然后我去掉之后,就不报错了!!!
SSM主流框架入门与综合项目实战2018版
- 参与学习 人
- 提交作业 205 份
- 解答问题 4317 个
Java中非常实用的SSM整合开发内容,从Spring开始,到MyBaits的进阶内容,再到SpringMVC的应用,最后是SSM整合开发案例,逐步深入,助你成长为一名Java工程师!
了解课程



恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星