English 中文(简体)
Keycloak 要求获得一个种类的海底,即org.keycloak.adapters。
原标题:Keycloak example Required a bean of type org.keycloak.adapters.springboot.KeycloakSpringBootProperties

I config a simple example about keycloak using keycloak-spring-boot-starter 17.0.1 But when i use KeycloakSpringBootProperties like this

@Service
@RequiredArgsConstructor
public class KeycloakServiceImpl implements KeycloakService {
    private final KeycloakSpringBootProperties keycloakSpringBootProperties;

    @Value("${user-keycloak}")
    private String keycloakUsername;

    @Value("${password-keycloak}")
    private String keycloakPassword;

    @Override
    public Keycloak getKeycloak() {
        return Keycloak.getInstance(
                keycloakSpringBootProperties.getAuthServerUrl(),
                keycloakSpringBootProperties.getRealm(),
                keycloakUsername,
                keycloakPassword,
                keycloakSpringBootProperties.getResource(),
                (String) keycloakSpringBootProperties.getCredentials().get("secret"));
    }
}

this error occur Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type org.keycloak.adapters.springboot.KeycloakSpringBootProperties available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} Description:

在vn.com.mbbank.ouly.user.service.impl.Keycloak ServiceImpl中,建筑商的参数为0,需要一种无法找到的苯基切洛卡-适应器。

行动:

考虑在您的组合中界定一个星号,即:org.keycloak.adapters。

Does anyone have any solution?

问题回答

页: 1 页: 1





相关问题
WAF FILE could not EXPORT due to no WEB PROJECT option found

I was trying to create a war file on spring tool suite 4 (windows version). But as I was about to export the it to the local file system, I couldn t find the web project (wiseai-console) option of the ...

Combine multiple cb.literal() into 1 Expression

I am working on a Spring Boot project that uses PostgreSQL. I want to create a advanced search feature where user can search through the jsonb column that I have in many of my tables. Somewhere in my ...

Error using criteriaBuilder.max() for LocalDate

I am trying to get max date using criteria builder in a subquery. But I am getting this error Required type: Expression Provided: Expression Subquery<LocalDate> subRoot = criteriaQuery....

热门标签