一直在整合spring+hibernate,今天整合一下JPA +Spring
persistence.xml
默认放在 META-INF 目录下
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence_1_0.xsd" version="1.0">
org.hibernate.ejb.HibernatePersistence
MyClass
applicationContext.xml
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.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306
########
########
分享到:
2008-06-25 10:17
浏览 2640
评论
1 楼
greemranqq
2011-11-09
jdbc:mysql://localhost:3306 后面需要指定databaseName吗?