Quartz 标记一下

Quartz 2.1.7 + spring-core-3.2.2.RELEASE


http://blog.csdn.net/lk_blog/article/details/11744621


http://blog.csdn.net/cuihaiyang/article/details/6742869


http://ronxin999.blog.163.com/blog/static/422179202011521147054/


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="
	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
	http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">
	<!-- 默认以settings.xml为全局配置文件 -->
	<context:property-placeholder location="classpath:settings.xml" ignore-resource-not-found="true" />
	<!-- 定义数据源 -->
	<bean id="dataSource" class="org.apache.tomcat.dbcp.dbcp.BasicDataSource"
		destroy-method="close">
		<property name="driverClassName" value="${db.driver}" />
		<property name="url" value="${db.url}" />
		<property name="username" value="${db.username}" />
		<property name="password" value="${db.password}" />
		<property name="maxActive" value="${db.maxActive}" />
		<property name="maxIdle" value="${db.maxIdle}" />
		<property name="maxWait" value="${db.maxWait}" />
	</bean>
	<bean id="scheduler"
		class="org.springframework.scheduling.quartz.SchedulerFactoryBean"
		lazy-init="false">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
	</bean>
	<bean id="sessionFactory" parent="baseSessionFactory">
		<!-- <property name="packagesToScan">
			<list>
				<value>com.gs.os.entity</value>
			</list>
		</property> -->
	</bean>
	<!-- 定义基本的Hibernate SessionFactory,供继承。 -->
	<bean id="baseSessionFactory" abstract="true"
		class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<!-- 加载自定义UserType -->
		<property name="annotatedPackages" value="coo.core.hibernate.usertype" />
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.show_sql">${db.show_sql}</prop>
				<prop key="hibernate.hbm2ddl.auto">${db.hbm2ddl.auto}</prop>
				<prop key="hibernate.dialect">${db.dialect}</prop>
				<prop key="hibernate.cache.use_query_cache">${db.cache.use_query_cache}</prop>
				<prop key="hibernate.cache.use_second_level_cache">${db.cache.use_second_level_cache}</prop>
				<prop key="hibernate.cache.region.factory_class">${db.cache.region.factory_class}</prop>
				<prop key="hibernate.jdbc.fetch_size">${db.jdbc.fetch_size}</prop>
				<prop key="hibernate.jdbc.batch_size">${db.jdbc.batch_size}</prop>
			</props>
		</property>
	</bean>
	<!-- 定义事务管理 -->
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate4.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
	<!-- 加载应用组件 -->
	<context:component-scan base-package="com.gs.os" />
	<context:component-scan base-package="core.base" />
	<!-- shiro security -->  
	<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">  
	    <property name="securityManager" ref="securityManager"/>
	</bean>  
	  
	<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">  
	    <property name="realm" ref="customRealm"/>  
	</bean>  
	<bean id="customRealm" class="core.base.security.CustomRealm" />  
	<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor" />
	
	<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" depends-on="lifecycleBeanPostProcessor"/>

    <bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
        <property name="securityManager" ref="securityManager"/>
    </bean>
</beans>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

lzj0470

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值