81,094
社区成员
发帖
与我相关
我的任务
分享
<?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:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
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.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- Configurer that replaces ${...} placeholders with values from a properties file -->
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
<context:property-placeholder location="classpath:conf/jdbc.properties"/>
<!-- Enable @Transactional support -->
<tx:annotation-driven/>
<context:annotation-config />
<!-- Enable @AspectJ support -->
<aop:aspectj-autoproxy/>
<aop:config>
<aop:advisor id="managerTx" advice-ref="txAdvice" pointcut="execution(* com.ifinesoft.asms.service.*.*(..))"/>
</aop:config>
<!--
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="find*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="get*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="inse*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="remove*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="edit*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="do*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="save*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="create*" propagation="REQUIRED" rollback-for="Exception"/>
<tx:method name="*Update" propagation="REQUIRED" rollback-for="Exception"/>
</tx:attributes>
</tx:advice>
-->
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" propagation="REQUIRED" rollback-for="Exception"/>
</tx:attributes>
</tx:advice>
<!-- Scans for @Repository, @Service and @Component -->
<context:component-scan base-package="com.ifinesoft.asms"/>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.ym.gps.model.DeviceInfo" table="DEVICEINFO">
<id name="id" type="java.lang.Integer" column="ID">
<generator class="sequence">
<param name="sequence">seq_deviceinfo</param>
</generator>
</id>
<property name="deviceNo" column="DEVICENO" />
<property name="deviceSim" column="DEVICESIM" />
<property name="deviceSold" column="DEVICESOLD" type="java.lang.Integer"/>
<property name="deviceAddTime" column="DEVICEADDTIME" type="java.sql.Timestamp" />
<property name="deviceSoldTime" column="DEVICESOLDTIME" type="java.sql.Timestamp" />
<property name="deviceCompanyId" column="DEVICECOMPANYID" type="java.lang.Integer"/>
<property name="deviceTypeId" column="DEVICETYPEID" type="java.lang.Integer"/>
<property name="deviceEffictive" column="DEVICEEFFICTIVE" type="java.lang.Integer"/>
<property name="devicePrice" column="DEVICEPRICE" type="java.lang.Integer"/>
<property name="deviceEndTime" column="DEVICEENDTIME" type="java.sql.Timestamp" />
</class>
</hibernate-mapping>