java是一种可以撰写跨平台应用软件的面向对象的程序设计语言,是由Sun Microsystems公司于1995年5月推出的Java程序设计语言和Java平台(即JavaEE, JavaME, JavaSE)的总称。本站提供基于Java框架struts,spring,hibernate等的桌面应用、web交互及移动终端的开发技巧与资料

保持永久学习的心态,将成就一个优秀的你,来 继续搞起java知识。

version="1.0" encoding="UTF-8"?>
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:websocket="http://www.springframework.org/schema/websocket"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/websocket
http://www.springframework.org/schema/websocket/spring-websocket-4.1.xsd
http://www.springframework.org/schema/data/jpa
http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-4.1.xsd
http://www.springframework.org/schema/rabbit
http://www.springframework.org/schema/rabbit/spring-rabbit-1.4.xsd
http://www.springframework.org/schema/task
>
' target='_blank'>http://www.springframework.org/schema/task/spring-task-4.1.xsd">

base-package="com.test.**">
type="annotation"
expression="org.springframework.stereotype.Controller" />


transaction-manager="transactionManager"
proxy-target-class="true" />
base-package="com.test.
repository-impl-postfix="Impl" entity-manager-factory-ref="entityManagerFactory"
transaction-manager-ref="transactionManager" />
id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
name="dataSource" ref="dataSource" />
name="packagesToScan" value="com.test. />
name="persistenceProvider">
class="org.hibernate.ejb.HibernatePersistence" />

name="jpaVendorAdapter">
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
name="generateDdl" value="true" />
name="databasePlatform" value="${hibernate.dialect}" />
name="showSql" value="${hibernate.show_sql}" />


name="jpaDialect">
class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />

name="jpaPropertyMap">


key="hibernate.query.substitutions" value="true 1, false 0" />
key="hibernate.default_batch_fetch_size" value="16" />
key="hibernate.max_fetch_depth" value="2" />
key="hibernate.generate_statistics" value="true" />
key="hibernate.bytecode.use_reflection_optimizer"
value="true" />
key="hibernate.cache.use_second_level_cache" value="${hibernate.cache.use_second_level_cache}" />
key="hibernate.cache.use_query_cache" value="${hibernate.cache.use_query_cache}" />
key="hibernate.hbm2ddl.auto" value="${hibernate.hbm2ddl.auto}" />





id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
name="entityManagerFactory" ref="entityManagerFactory" />


name="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
name="driverClassName" value="${hibernate.connection.driver_class}" />
name="url" value="${hibernate.connection.url}" />
name="username" value="${hibernate.connection.username}" />
name="password" value="${hibernate.connection.password}" />

id="objectMapper" class="com.test.core.utils.JsonObjectMapper" />

data-source="dataSource"
ignore-failures="ALL">
location="classpath:*.sql" encoding="UTF-8" />


id="taskExecutor" pool-size="4-256" queue-capacity="128" />

/>
id="rabbitListenerContainerFactory" class="org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory">
name="connectionFactory" ref="rabbitConnFactory" />
name="transactionManager" ref="transactionManager" />
name="concurrentConsumers" value="1" />
name="maxConcurrentConsumers" value="10" />
name="messageConverter" ref="jsonMessageConverter" />
name="taskExecutor" ref="taskExecutor" />
name="channelTransacted" value="true" />
name="adviceChain">

bean="retryInterceptor" />




id="rabbitConnectionFactory" class="com.rabbitmq.client.ConnectionFactory">
name="host" value="${rabbitmq.host}" />
name="port" value="${rabbitmq.port}" />
name="username" value="${rabbitmq.username}" />
name="password" value="${rabbitmq.password}" />
name="virtualHost" value="${rabbitmq.vhost}" />
name="connectionTimeout" value="${rabbitmq.connection.timeout}" />

id="rabbitConnFactory" class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
ref="rabbitConnectionFactory" />
name="channelCacheSize" value="25" />
name="executor" ref="taskExecutor" />

connection-factory="rabbitConnFactory" id="rabbitAdmin" />

id="amqpTemplate" reply-timeout="1000" connection-factory="rabbitConnFactory" message-converter="jsonMessageConverter" />

id="dlxNaming" key-type="java.lang.String" value-type="java.lang.String">
key="zkcloud.subsystem.dlx.queue" value="#{'$dlx_queue_'+(T(com.zkteco.timecube.zkcloud.core.utils.PropertiesUtil).getValue('zkcloud.subsystem.code'))}" />
key="zkcloud.subsystem.dlx.exchange" value="#{'$dlx_ex_'+(T(com.zkteco.timecube.zkcloud.core.utils.PropertiesUtil).getValue('zkcloud.subsystem.code'))}" />

id="zkcloud.subsystem.dlx.queue" name="#{dlxNaming['zkcloud.subsystem.dlx.queue']}">

key="x-message-ttl">
type="java.lang.Long">86400000

key="x-max-length">
type="java.lang.Long">100



id="zkcloud.subsystem.dlx.exchange" name="#{dlxNaming['zkcloud.subsystem.dlx.exchange']}">

queue="zkcloud.subsystem.dlx.queue" />


id="retryInterceptor" class="org.springframework.amqp.rabbit.config.StatelessRetryOperationsInterceptorFactoryBean">
name="messageRecoverer" ref="messageRecoverer" />
name="retryOperations" ref="retryTemplate" />



id="messageRecoverer" class="com.test.retry.RejectAndRplyToRequeueRecoverer">
name="replyToTemplate" ref="amqpTemplate"/>

id="retryTemplate" class="org.springframework.retry.support.RetryTemplate">
name="backOffPolicy">
class="org.springframework.retry.backoff.ExponentialBackOffPolicy">
name="initialInterval" value="1000" />
name="maxInterval" value="10000" />


name="retryPolicy">
class="org.springframework.retry.policy.SimpleRetryPolicy">
name="maxAttempts" value="1" />



id="jsonMessageConverter"
class="org.springframework.amqp.support.converter.Jackson2JsonMessageConverter">

class="com.zkteco.timecube.quartz.QuartJobSchedulingListener" />
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
name="jobFactory">
class="com.zkteco.timecube.quartz.SpringQuartzJobFactory">

name="dataSource" ref="dataSource" />

name="configLocation" value="classpath:config/quartz.properties" />


profile="develop">
id="propertyConfigurer" class="com.test.core.utils.PropertiesUtil"
lazy-init="false">
name="locations">

classpath*:config/*.properties


name="fileEncoding" value="utf-8" />


id="rabbitConnFactory"
host="localhost" username="guest" password="guest" port="5672"
virtual-host="/" connection-timeout="30000" executor="taskExecutor" />

profile="test">
id="propertyConfigurer" class="com.test.core.utils.PropertiesUtil"
lazy-init="false">
name="locations">

classpath*:config/*.properties
classpath*:config/test/*.properties


name="fileEncoding" value="utf-8" />


id="rabbitConnFactory"
host="192.168.0.179" username="guest" password="timeucbe" port="5672"
virtual-host="/" connection-timeout="30000" executor="taskExecutor" />

profile="production">
id="propertyConfigurer" class="com.test.core.utils.PropertiesUtil"
lazy-init="false">
name="locations">

classpath*:config/*.properties
classpath*:config/production/*.properties


name="fileEncoding" value="utf-8" />

id="rabbitConnFactory"
host="114.215.82.3" username="guest" password="timecube" port="5672"
virtual-host="/" connection-timeout="30000" executor="taskExecutor" />



rabbitmq

因为水平有限,难免有疏忽或者不准确的地方,希望大家能够直接指出来,我会及时改正。一切为了知识的分享。

后续会有更多的精彩的内容分享给大家。