Skip to content
Snippets Groups Projects
Commit 5c25ef9c authored by Mic's avatar Mic
Browse files

removed former Hibernate xml configuration

parent 0c2665f1
No related branches found
No related tags found
No related merge requests found
......@@ -12,15 +12,15 @@
</appender>
<logger name="org.springframework.samples.petclinic.aspects">
<level value="DEBUG" />
<level value="info" />
</logger>
<logger name="org.springframework.web">
<level value="DEBUG" />
<level value="info" />
</logger>
<logger name="org.springframework.jdbc">
<level value="DEBUG" />
<level value="info" />
</logger>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
- Mapping file for the Hibernate implementation of the Clinic interface.
-->
<hibernate-mapping auto-import="true" default-lazy="false">
<class name="org.springframework.samples.petclinic.Vet" table="vets">
<id name="id" column="id">
<generator class="identity"/>
</id>
<property name="firstName" column="first_name"/>
<property name="lastName" column="last_name"/>
<set name="specialtiesInternal" table="vet_specialties">
<key column="vet_id"/>
<many-to-many column="specialty_id" class="org.springframework.samples.petclinic.Specialty"/>
</set>
</class>
<class name="org.springframework.samples.petclinic.Specialty" table="specialties">
<id name="id" column="id">
<generator class="identity"/>
</id>
<property name="name" column="name"/>
</class>
<class name="org.springframework.samples.petclinic.Owner" table="owners">
<id name="id" column="id">
<generator class="identity"/>
</id>
<property name="firstName" column="first_name"/>
<property name="lastName" column="last_name"/>
<property name="address" column="address"/>
<property name="city" column="city"/>
<property name="telephone" column="telephone"/>
<set name="petsInternal" inverse="true" cascade="all">
<key column="owner_id"/>
<one-to-many class="org.springframework.samples.petclinic.Pet"/>
</set>
</class>
<class name="org.springframework.samples.petclinic.Pet" table="pets">
<id name="id" column="id">
<generator class="identity"/>
</id>
<property name="name" column="name"/>
<property name="birthDate" column="birth_date" type="date"/>
<many-to-one name="owner" column="owner_id" class="org.springframework.samples.petclinic.Owner"/>
<many-to-one name="type" column="type_id" class="org.springframework.samples.petclinic.PetType"/>
<set name="visitsInternal" inverse="true" cascade="all">
<key column="pet_id"/>
<one-to-many class="org.springframework.samples.petclinic.Visit"/>
</set>
</class>
<class name="org.springframework.samples.petclinic.PetType" table="types">
<id name="id" column="id">
<generator class="identity"/>
</id>
<property name="name" column="name"/>
</class>
<class name="org.springframework.samples.petclinic.Visit" table="visits">
<id name="id" column="id">
<generator class="identity"/>
</id>
<property name="date" column="visit_date" type="date"/>
<property name="description" column="description"/>
<many-to-one name="pet" column="pet_id" class="org.springframework.samples.petclinic.Pet"/>
</class>
</hibernate-mapping>
......@@ -53,6 +53,13 @@
<!-- Call monitoring aspect that monitors call count and call invocation time -->
<bean id="callMonitor" class="org.springframework.samples.petclinic.aspects.CallMonitoringAspect"/>
<!--
Exporter that exposes the Clinic DAO and the CallMonitoringAspect via JMX,
based on the @ManagedResource, @ManagedAttribute, and @ManagedOperation annotations.
-->
<context:mbean-export/>
<beans profile="jpa">
<!-- JPA EntityManagerFactory -->
......@@ -94,11 +101,6 @@
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource"/>
<!--
Exporter that exposes the Clinic DAO and the CallMonitoringAspect via JMX,
based on the @ManagedResource, @ManagedAttribute, and @ManagedOperation annotations.
-->
<context:mbean-export/>
<!-- PetClinic's central data access object using Spring's SimpleJdbcTemplate -->
<bean id="clinic" class="org.springframework.samples.petclinic.jdbc.JdbcClinic"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment