zoukankan      html  css  js  c++  java
  • springboot08

    ,然后打开cas.properties,加入数据库的相关配置如下:(请修改为自己的数据库地址,用户名和密码)

    复制代码
    复制代码
    # == Basic database connection pool configuration ==
    database.driverClass=com.mysql.jdbc.Driver
    database.url=jdbc:mysql://127.0.0.1:3306/sso_test?useUnicode=true&characterEncoding=UTF-8&
    database.user=root
    database.password=admin
    database.pool.minSize=6
    database.pool.maxSize=18
    
    # Maximum amount of time to wait in ms for a connection to become
    # available when the pool is exhausted
    database.pool.maxWait=10000
    
    # Amount of time in seconds after which idle connections
    # in excess of minimum size are pruned.
    database.pool.maxIdleTime=120
    
    # Number of connections to obtain on pool exhaustion condition.
    # The maximum pool size is always respected when acquiring
    # new connections.
    database.pool.acquireIncrement=6
    
    # == Connection testing settings ==
    
    # Period in s at which a health query will be issued on idle
    # connections to determine connection liveliness.
    database.pool.idleConnectionTestPeriod=30
    
    # Query executed periodically to test health
    database.pool.connectionHealthQuery=select 1
    
    # == Database recovery settings ==
    
    # Number of times to retry acquiring a _new_ connection
    # when an error is encountered during acquisition.
    database.pool.acquireRetryAttempts=5
    
    # Amount of time in ms to wait between successive aquire retry attempts.
    database.pool.acquireRetryDelay=2000
    复制代码
    复制代码

     对cas.propeities进行修改,去掉“cas.jdbc.authn.query.sql=”前的注释符,改为适合项目的语句,比如:

    1
    cas.jdbc.authn.query.sql=select password from sso_user where username=?

      

    4)   允许注销后可重定向(可选)

    修改cas.propeities,去掉“cas.logout.followServiceRedirects=false”前的注释符,改为:

    cas.logout.followServiceRedirects=true

    5)   修改TGT为永不失效策略

    修改deployerConfigContext.xml,注释掉原来的grantingTicketExpirationPolicy,修改为:

    <!--<alias name="ticketGrantingTicketExpirationPolicy" alias="grantingTicketExpirationPolicy" />-->
    <alias name="neverExpiresExpirationPolicy" alias="grantingTicketExpirationPolicy" />
  • 相关阅读:
    H5 video播放视频遇到的问题
    IIS域名转发
    IIS Tomcat共享80端口
    C# 操作注册表WindowsRegistry
    Owin Middleware如何在IIS集成管道中执行
    如何定义一个有效的OWIN Startup Class
    mysql 数据库的备份与还原 at winows
    windows查看端口占用
    asp.net 二级域名表单认证情况下共享Cookie
    c# 多线程使用队列顺序写日志的类 (需要再优化)
  • 原文地址:https://www.cnblogs.com/huaobin/p/14909209.html
Copyright © 2011-2022 走看看