继续我以前的question。我正在CAS 5上根据自己的需求进行修改。现在,借助CAS tutorial,我完成了自定义身份验证。现在,我已将以下依赖项添加到pom.xml
中,以通过遵循link连接到数据库。
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-jdbc</artifactId>
<version>${cas.version}</version>
</dependency>
并在application.properties
cas.authn.jdbc.query[0].sql=some query
cas.authn.jdbc.query[0].url=jdbc:postgresql://127.0.0.1/dbcas
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.PostgreSQLDialect
cas.authn.jdbc.query[0].user=readonly
cas.authn.jdbc.query[0].password=readonly
cas.authn.jdbc.query[0].ddlAuto=none
cas.authn.jdbc.query[0].driverClass=org.postgresql.Driver
但这不起作用意味着获取
类型 'org.apereo.cas.configuration.model.support.jdbc.QueryJdbcAuthenticationProperties' 没有属性“ url”
我在这里错过了什么吗?任何人都可以帮助我。
更新:
我已经检查了QueryJdbcAuthenticationProperties
的来源
@RequiredProperty
private String sql;
还有AbstractJpaProperties
private String dialect;
private String ddlAuto;
@RequiredProperty
private String driverClass;
@RequiredProperty
private String url;
@RequiredProperty
private String user;
@RequiredProperty
private String password;
我在cas-server-core-api-configuration-model-5.3.2.jar
文件中找到了相同的两个类,而在其他任何package和jar文件中都找不到这两个类。
这是什么问题。我无法识别它。
如何知道这些属性(
cas.authn.jdbc.query
)在哪里 定义?
我认为在定义这些数据库属性时已使用子类QueryJdbcAuthenticationProperties
创建了对象。