<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Spring Security 指定登陸入口

      spring security除通過form-login的熟悉指定登陸還可以通過entry-point-ref 指定登陸入口。具體配置如下:

      <?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:security="http://www.springframework.org/schema/security"
             xsi:schemaLocation="http://www.springframework.org/schema/beans
             http://www.springframework.org/schema/beans/spring-beans.xsd
             http://www.springframework.org/schema/security
             http://www.springframework.org/schema/security/spring-security.xsd">
          <!-- entry-point-ref指定登錄入口 -->
          <security:http entry-point-ref="authEntryPoint">
              <security:logout delete-cookies="JSESSIONID" />
              <security:intercept-url pattern="/login*.jsp*"
                                      access="IS_AUTHENTICATED_ANONYMOUSLY" />
              <security:intercept-url pattern="/**" access="ROLE_USER" />
              <!-- 添加自己定義的AuthenticationFilter到FilterChain的FORM_LOGIN_FILTER位置 -->
              <security:custom-filter ref="authenticationFilter" position="FORM_LOGIN_FILTER"/>
          </security:http>
          <!-- AuthenticationEntryPoint,引導用戶進行登錄 -->
          <bean id="authEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
              <property name="loginFormUrl" value="/login.jsp">
              </property>
          </bean>
      
          <!-- 認證過濾器 -->
          <bean id="authenticationFilter"
                class="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter">
              <property name="authenticationManager" ref="authenticationManager" />
              <property name="usernameParameter" value="username"/>
              <property name="passwordParameter" value="password"/>
              <property name="filterProcessesUrl" value="/login.do" />
          </bean>
      
          <security:authentication-manager alias="authenticationManager">
              <security:authentication-provider user-service-ref="userDetailsService">
                  <security:password-encoder hash="md5"></security:password-encoder>
              </security:authentication-provider>
          </security:authentication-manager>
          <bean id="userDetailsService" class="org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl">
              <property name="dataSource" ref="dataSource"></property>
          </bean>
      
          <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
              <property name="driverClass" value="com.mysql.jdbc.Driver"></property>
              <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/security"></property>
              <property name="user" value="root"></property>
              <property name="password" value="root"></property>
              <property name="acquireIncrement" value="5"></property>  <!-- 當連接池中的連接用完時,C3P0一次性創建新連接的數目2 -->
              <property name="initialPoolSize" value="10"></property>  <!-- 初始化時創建的連接數,必須在minPoolSize和maxPoolSize之間 -->
              <property name="minPoolSize" value="5"></property>
              <property name="maxPoolSize" value="20"></property>
              <!-- 最大空閑時間,超過空閑時間的連接將被丟棄
              [需要注意:mysql默認的連接時長為8小時(28800)【可在my.ini中添加 wait_timeout=30(單位秒)設置連接超時】,這里設置c3p0的超時必須<28800]
              -->
              <property name="maxIdleTime" value="300"></property>
              <property name="idleConnectionTestPeriod" value="60"></property> <!-- 每60秒檢查連接池中的空閑連接 -->
              <property name="maxStatements" value="20"></property>  <!-- jdbc的標準參數  用以控制數據源內加載的PreparedStatement數量,但由于預緩存的Statement屬 于單個Connection而不是整個連接 -->
          </bean>
      </beans>

      本文配置摘自:http://haohaoxuexi.iteye.com/blog/2161648

      posted @ 2014-12-11 15:47  tyb1222  閱讀(2175)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 国产老女人免费观看黄A∨片 | 亚洲中文字幕亚洲中文精| 91精品国产一二三产区| 色欲久久久天天天综合网| 动漫av网站免费观看| 欧洲无码一区二区三区在线观看| 国产精品午夜福利91| 西充县| 91精品国产老熟女在线| 性色在线视频精品| 日韩精品有码中文字幕| 巨胸爆乳美女露双奶头挤奶| 亚洲一区二区三区自拍偷拍| 香蕉EEWW99国产精选免费| 九九久久精品国产免费看小说| 少妇人妻精品一区二区| 国产精品视频免费一区二区| 综合激情亚洲丁香社区| √天堂资源地址在线官网| 午夜成人精品福利网站在线观看| 在线播放免费人成毛片| 遵义县| 亚洲国产片一区二区三区| 麻豆精品国产熟妇aⅴ一区| 久久综合伊人77777| 国产精品尤物乱码一区二区| 久久96热在精品国产高清| 色狠狠色婷婷丁香五月| 欧美粗大| 精品国产AV最大网站| 日本高清在线观看WWW色| 亚洲一区二区美女av| 一本色道久久88亚洲精品综合| 给我播放片在线观看| 午夜射精日本三级| 麻豆精品一区二正一三区| 成人午夜伦理在线观看| 国产精品久久蜜臀av| 人妻丰满熟妇av无码区| 国产蜜臀久久av一区二区| 国产羞羞的视频一区二区|