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?