CAS5.3.X 配置备忘

##
# 普通MD5用户jdbc验证
##
#配置数据库连接
cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.query[0].url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.query[0].user=root
cas.authn.jdbc.query[0].password=123456
#添加jdbc认证
cas.authn.jdbc.query[0].sql=SELECT * FROM user_info WHERE username =?
#哪个字段作为密码字段
cas.authn.jdbc.query[0].fieldPassword=password
#哪个字段作为过期字段 0:未过期  1:已过期
cas.authn.jdbc.query[0].fieldExpired=expired
#哪个字段作为是否可用字段 0:未禁用  1:已禁用
cas.authn.jdbc.query[0].fieldDisabled=disabled
#MD5设置
cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5
##
# 加盐MD5用户jdbc验证
##
#配置数据库连接
cas.authn.jdbc.encode[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.encode[0].url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.encode[0].user=root
cas.authn.jdbc.encode[0].password=123456
#加密迭代次数
cas.authn.jdbc.encode[0].numberOfIterations=2
#该列名的值可替代上面的值,但对密码加密时必须取该值进行处理
cas.authn.jdbc.encode[0].numberOfIterationsFieldName=
#动态盐值用的字段
cas.authn.jdbc.encode[0].saltFieldName=username
#静态盐值
cas.authn.jdbc.encode[0].staticSalt=654321
cas.authn.jdbc.encode[0].sql=SELECT * FROM user_info WHERE username =?
#对处理盐值后的算法
cas.authn.jdbc.encode[0].algorithmName=MD5
#哪个字段作为密码字段
cas.authn.jdbc.encode[0].passwordFieldName=password
#哪个字段作为过期字段 0:未过期  1:已过期
cas.authn.jdbc.encode[0].expiredFieldName=expired
#哪个字段作为是否可用字段 0:未禁用  1:已禁用
cas.authn.jdbc.encode[0].disabledFieldName=disabled
##
# 动态services
##
#配置数据库连接
cas.serviceRegistry.jpa.driverClass=com.mysql.cj.jdbc.Driver
cas.serviceRegistry.jpa.url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.serviceRegistry.jpa.dialect=org.hibernate.dialect.MySQL5Dialect
cas.serviceRegistry.jpa.user=root
cas.serviceRegistry.jpa.password=123456
#连接池配置
cas.serviceRegistry.jpa.pool.suspension=false
cas.serviceRegistry.jpa.pool.minSize=6
cas.serviceRegistry.jpa.pool.maxSize=18
#下面两项的配置不要超过mysql数据库的wait_timeout和interactive_timeout两项配置 cas.serviceRegistry.jpa.pool.maxWait=30 cas.serviceRegistry.jpa.pool.timeoutMillis=30 #默认为create-drop,表示每次启动服务都会清除你之前注册的cas服务 cas.serviceRegistry.jpa.ddlAuto=update
原文地址:https://www.cnblogs.com/kgdxpr/p/9933106.html