数据推送修改保存
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
|
||||
#jdbc.url=jdbc\:mysql\://139.196.24.156\:3306/myfishdb?characterEncoding\=UTF-8
|
||||
jdbc.username=ifish
|
||||
jdbc.password=ifish7pwd
|
||||
jdbc.username=root
|
||||
jdbc.password=123456
|
||||
#jdbc.username=ifish
|
||||
#jdbc.password=ifish7pwd
|
||||
#jdbc.username=root
|
||||
#jdbc.password=ifish7mysql
|
||||
#jdbc.testWhileIdle=true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
log4j.rootLogger=INFO,Console,File
|
||||
log4j.rootLogger=DEBUG,Console,File
|
||||
#\u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u76EE\u7684\u5730\u4E3A\u63A7\u5236\u53F0
|
||||
log4j.appender.Console=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.Console.Target=System.out
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.device.mapper.TblDeviceHeaterMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.device.mapper.TblDeviceMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.device.mapper.TblFactoryHardwareMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.device.mapper.TblFactoryListMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.device.mapper.TblHardwareTypeMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.user.mapper.TblDeviceUserMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.user.mapper.TblLoginRecordMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.user.mapper.TblPushListMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ifish7.mq.business.user.mapper.TblUserMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<bean id="propertyConfigurer"
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations" >
|
||||
<list>
|
||||
<value>classpath:mq.properties</value>
|
||||
<value>classpath:jdbc.properties</value>
|
||||
<value>classpath:log4j.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<import resource="spring/spring-mq.xml" />
|
||||
<import resource="spring/spring-mybatis.xml" />
|
||||
|
||||
<!-- 自动扫描 -->
|
||||
<context:component-scan base-package="com.ifish7.mq.*" />
|
||||
<bean id="app" class="com.ifish7.mq.utils.AppBeans" />
|
||||
</beans>
|
||||
@@ -1,21 +1,12 @@
|
||||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xmlns:amq="http://activemq.apache.org/schema/core"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-4.1.xsd
|
||||
http://activemq.apache.org/schema/core
|
||||
http://activemq.apache.org/schema/core/activemq-core-5.14.1.xsd">
|
||||
|
||||
<bean id="propertyConfigurer"
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="classpath:mq.properties" />
|
||||
</bean>
|
||||
<context:component-scan base-package="com.ifish7.mq.queues.*" />
|
||||
|
||||
<amq:connectionFactory id="amqConnectionFactory"
|
||||
brokerURL="${broker_url}"
|
||||
userName="${username}"
|
||||
+14
-20
@@ -1,27 +1,15 @@
|
||||
<?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:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
<!-- 自动扫描 -->
|
||||
<context:component-scan base-package="com.ifish7.mq.data">
|
||||
<!-- 这里要把controler下面的 controller去除,他们是在spring-mvc.xml中配置的,如果不去除会影响事务管理的。 -->
|
||||
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
|
||||
</context:component-scan>
|
||||
<!-- 引入配置文件 -->
|
||||
<bean id="propertyConfigurer"
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="location" value="classpath:jdbc.properties" />
|
||||
</bean>
|
||||
|
||||
<bean name="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
|
||||
<property name="driverClassName" value="${jdbc.driver}" />
|
||||
<property name="url" value="${jdbc.url}" />
|
||||
@@ -59,15 +47,15 @@
|
||||
</bean>
|
||||
|
||||
<!-- spring和MyBatis完美整合,不需要mybatis的配置映射文件 -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<bean id="sqlSessionFactory" class="com.ifish7.mq.utils.MybatisSqlSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<!-- 自动扫描mapping.xml文件 -->
|
||||
<property name="mapperLocations" value="classpath:com/ifish7/mq/data/mapping/*.xml"></property>
|
||||
</bean>
|
||||
|
||||
<property name="mapperLocations" value="classpath:mapper/*/*.xml"></property>
|
||||
</bean>
|
||||
|
||||
<!-- DAO接口所在包名,Spring会自动查找其下的类 -->
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<property name="basePackage" value="com.dnkx.dao" />
|
||||
<property name="basePackage" value="com.ifish7.mq.business.*.mapper" />
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
|
||||
</bean>
|
||||
|
||||
@@ -86,7 +74,7 @@
|
||||
|
||||
<aop:config>
|
||||
<!-- 定义切点 -->
|
||||
<aop:pointcut id="allServiceMethods" expression="execution(* com.ifish7.mq.data.*.service.impl.*.*(..))"/>
|
||||
<aop:pointcut id="allServiceMethods" expression="execution(* com.ifish7.mq.business.*.service.impl.*.*(..))"/>
|
||||
<!-- 植入切面通知(增强处理) -->
|
||||
<aop:advisor advice-ref="txAdvice" pointcut-ref="allServiceMethods"/>
|
||||
</aop:config>
|
||||
@@ -95,9 +83,15 @@
|
||||
<tx:attributes>
|
||||
<tx:method name="find*" read-only="true"/>
|
||||
<tx:method name="load*" read-only="true"/>
|
||||
<tx:method name="get*" read-only="true"/>
|
||||
<tx:method name="list*" read-only="true"/>
|
||||
<tx:method name="page*" read-only="true"/>
|
||||
<tx:method name="query*" read-only="true"/>
|
||||
<tx:method name="add*" propagation="REQUIRED"/>
|
||||
<tx:method name="save*" propagation="REQUIRED"/>
|
||||
<tx:method name="update*" propagation="REQUIRED"/>
|
||||
</tx:attributes>
|
||||
<tx:method name="remove*" propagation="REQUIRED"/>
|
||||
</tx:attributes>
|
||||
</tx:advice>
|
||||
|
||||
</beans>
|
||||
Reference in New Issue
Block a user