夢(mèng)幻之旅

          DEBUG - 天道酬勤

             :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評(píng)論 :: 0 Trackbacks
          <?xml version="1.0" encoding="UTF-8" ?>
          <beans xmlns="http://www.springframework.org/schema/beans"
              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-2.0.xsd"
          >
              
          <!--  <import resource="classpath:hvp/spring/hibernate/orm/beans.xml"/>-->
              
          <bean id="dataSource"
                  class
          ="com.mchange.v2.c3p0.ComboPooledDataSource"
                  destroy-method
          ="close">
                  
          <property name="driverClass" value="com.mysql.jdbc.Driver" />
                  
          <property name="jdbcUrl"
                      value
          ="jdbc:mysql://127.0.0.1:3306/mydata" />
                  
          <property name="user" value="root" />
                  
          <property name="password" value="root" />
                  
          <property name="autoCommitOnClose" value="true" />
                  
          <property name="checkoutTimeout" value="5000" />
                  
          <property name="initialPoolSize" value="2" />
                  
          <property name="minPoolSize" value="2" />
                  
          <property name="maxPoolSize" value="4" />
                  
          <property name="maxIdleTime" value="25200" />
                  
          <property name="acquireIncrement" value="1800" />
                  
          <property name="maxIdleTimeExcessConnections" value="5" />
              
          </bean>
              
          <bean id="filterChainProxy"
                  class
          ="org.acegisecurity.util.FilterChainProxy">
                  
          <property name="filterInvocationDefinitionSource">
                      
          <value>
                          CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
                          PATTERN_TYPE_APACHE_ANT
                          /**=authenticationProcessingFilter
                      
          </value>
                  
          </property>
              
          </bean>
              
          <bean id="authenticationProcessingFilter"
                  class
          ="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
                  
          <property name="filterProcessesUrl"
                      value
          ="/j_acegi_security_check" />
                  
          <property name="defaultTargetUrl" value="/main.jsp" />
                  
          <property name="authenticationFailureUrl"
                      value
          ="/index.jsp?login_error=1" />
                  
          <property name="authenticationManager"
                      ref
          ="authenticationManager" />
              
          </bean>
              
          <bean id="authenticationManager"
                  class
          ="org.acegisecurity.providers.ProviderManager">
                  
          <property name="providers">
                      
          <list>
                          
          <ref local="daoAuthenticationProvider" />
                      
          </list>
                  
          </property>
              
          </bean>
              
          <bean id="daoAuthenticationProvider"
                  class
          ="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
                  
          <property name="userDetailsService" ref="userDetailsService" />
              
          </bean>
              
          <!-- -->
              
          <bean id="userDetailsService" class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
                  
          <property name="dataSource" ref="dataSource" />
                  
          <property name="usersByUsernameQuery">
                      
          <value>SELECT username,password,status FROM t_user WHERE username=?</value>
                  
          </property>
                  
          <property name="authoritiesByUsernameQuery">
                      
          <value>SELECT u.username,p.priv_name FROM t_user u,t_user_priv p WHERE u.user_id=p.user_id and u.username=?</value>
                  
          </property>
              
          </bean>
               
              
          <!-- 
              <bean id="userDetailsService"
                  class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
                  <property name="userMap">
                      <value>
                          huyvanmin=huyvanmin,PRIV_COMMON,PRIV_1
                          huyvanpull=huyvanpull,PRIV_COMMON,PRIV_1,PRIV_2
                          huyvanlee=huyvanlee,disabled,PRIV_COMMON,PRIV_1
                      </value>
                  </property>
              </bean>
               
          -->
          </beans>
          posted on 2008-09-01 23:18 HUIKK 閱讀(558) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): Spring
          主站蜘蛛池模板: 杂多县| 永城市| 禄丰县| 平安县| 南川市| 柳林县| 邹城市| 体育| 福鼎市| 潼关县| 左云县| 安达市| 鹤岗市| 沂南县| 嵩明县| 西林县| 都昌县| 黑龙江省| 德清县| 阜康市| 东莞市| 望江县| 喀什市| 龙门县| 苏州市| 都江堰市| 石渠县| 曲阳县| 济南市| 景谷| 丹阳市| 天全县| 香河县| 诏安县| 安宁市| 会泽县| 额敏县| 罗城| 富川| 宝鸡市| 特克斯县|