我们正在使用Keycloak v6.0.0和Spring Framework。我们想在Keycloak管理面板中根据@PathVariable值和@RequestBody字段值定义一些访问条件,但是找不到任何方法。我们如何访问这些字段的值并基于它定义资源或策略?
我正在使用 Spring Boot,当我想像SimpleJpaRepository这个接口一样扩展时:
public interface BaseRepository<T, ID extends Serializable> extends JpaRepository<T, ID>{}
Run Code Online (Sandbox Code Playgroud)
和这个实现:
public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRepository<T, ID> implements BaseRepository<T, ID>
{
private final EntityManager entityManager;
public BaseRepositoryImpl(Class<T> domainClass, EntityManager entityManager)
{
super(domainClass, entityManager);
this.entityManager = entityManager;
}
}
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Could not autowire. No beans of 'Class<T>' type found.
Run Code Online (Sandbox Code Playgroud)
我该如何解决?