CAS 数据库表为空
我已经按照此处描述的方式配置了 CAS
,但是它几乎按预期工作我有点困惑。 我使用 SQLServer DB 来存储数据,但表 TICKETGRANTINGTICKET 和 SERVICETICKET 始终为空。
这是正常行为吗?
相关配置项如下所示。
<!-- This is the EntityManagerFactory configuration for Hibernate -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true" />
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="net.sourceforge.jtds.jdbc.Driver"
p:url="jdbc:jtds:sqlserver://xyz:123/CAS;instance=xyz;user=yyy;password=zzz;domain=UUU"
/>
I've configured CAS in the way it is described here
It's working almost as expected, however I'm a bit confused.
I use a SQLServer DB to store the data, but the tables TICKETGRANTINGTICKET and SERVICETICKET are empty all the time.
Is this a normal behaviour?
The following shows the relevant configuration items.
<!-- This is the EntityManagerFactory configuration for Hibernate -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true" />
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
p:driverClassName="net.sourceforge.jtds.jdbc.Driver"
p:url="jdbc:jtds:sqlserver://xyz:123/CAS;instance=xyz;user=yyy;password=zzz;domain=UUU"
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现必须更改此点才能将 TGT 存储到数据库中。
该文档可以在此处找到
,不幸的是,这似乎只填充了 TGT 表,而不是 ST
更新:
使用了 ST,但由于 ST 的有效期仅为大约一秒,并且只能使用一次,因此表(几乎)总是空的
I found the point where this has to be changed in order to store TGT into the DB.
The documentation can be found here
Unfortunately this seems to fill only the TGT table and not the ST
Update:
The ST is used, but as the ST is valid only for about a second and just for one use the table is (almost)always empty