小编Ped*_*dez的帖子

如何在同一个应用程序中使用Hibernate和MyBatis

我想使用 Hibernate 和 MyBatis 与 Spring 集成来构建一个应用程序。在原型中,我必须运行它们,但不能一起运行。我的Spring应用上下文是:

\n\n
    <?xml version="1.0" encoding="UTF-8"?>\n<!--\n    Document   : applicationContext-spring.xml\n    Created on : 26 de diciembre de 2012, 15:49\n    Author     : Pedro Fdez\n    Description:\n        Fichero de configuraci\xc3\xb3n de Spring\n-->\n<beans xmlns="http://www.springframework.org/schema/beans"\n           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n           xmlns:aop="http://www.springframework.org/schema/aop"\n           xmlns:context="http://www.springframework.org/schema/context"\n           xmlns:tx="http://www.springframework.org/schema/tx"\n           xsi:schemaLocation="http://www.springframework.org/schema/beans \n            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd\n            http://www.springframework.org/schema/aop \n            http://www.springframework.org/schema/aop/spring-aop-3.0.xsd\n            http://www.springframework.org/schema/context \n            http://www.springframework.org/schema/context/spring-context-3.0.xsd\n            http://www.springframework.org/schema/tx \n            http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" default-autowire="byName">\n\n    <context:annotation-config />\n    <context:component-scan base-package="com.administracion.model.dao.implementations" />\n    <tx:annotation-driven transaction-manager="txManagerHibernate"/>\n    <aop:aspectj-autoproxy />   \n\n    <!-- ............................ -->\n    <!-- Configuraci\xc3\xb3n de datasource -->\n    <!-- ............................ -->\n    <bean id="dataSource"\n        class="org.apache.commons.dbcp.BasicDataSource"\n        destroy-method="close">\n        <property name="driverClassName" value="${jdbc.driverClassName}"/>\n        <property …
Run Code Online (Sandbox Code Playgroud)

java spring hibernate mybatis jakarta-ee

2
推荐指数
1
解决办法
4755
查看次数

标签 统计

hibernate ×1

jakarta-ee ×1

java ×1

mybatis ×1

spring ×1