Difference between configuring data source in persistence.xml and in spring configuration files
问题 I've seen (and done) data source configuration in two ways (the code below is just for demo): 1) configuration inside persistence units, like: <persistence-unit name="LocalDB" transaction-type="RESOURCE_LOCAL"> <class>domain.User</class> <exclude-unlisted-classes>true</exclude-unlisted-classes> <properties> <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> <property name="hibernate.connection.url" value="jdbc:hsqldb:hsql://localhost"/> <property name=