2022-08-03

Resolved: has been injected into other beans in its raw version as part of a circular reference

 
Resolved by referring to:
  1. https://www.baeldung.com/circular-dependencies-in-spring#2-use-lazy
  2. https://blog.51cto.com/u_13478207/3336383



has been injected into other beans in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.



structure to tell the story...

@Service
public class MainService{

    @Autowired
    private ServiceParent
}

@Service
public class ServiceParent{

    @Autowired
    private ServiceChild
    
}

@Service
public class ServiceChild{

    @Autowired
    private ServiceParent
    
}



then will hit the exception while maven run the application locally/at server.





@Service
public class ServiceChild{

    @Autowired
    @Lazy
    private ServiceParent
    
}
















2022-08-01

Keycloak 18.0.2

 

HTTP Error
302
401
500

clientId missing

solved by changing json config from installation as below

from:

  "auth-server-url": "http://localhost:9000/",
  "ssl-required": "none",
  "resource": "localsfaportal",

to:

  "url": "http://localhost:9000/",
  "ssl-required": "none",
  "clientId": "localsfaportal",



       [KEYCLOAK] Usage of legacy style promise methods such as `.error()` and `.success()` has been deprecated and support will be removed in future versions. Use standard style promise methods such as `.then() and `.catch()` instead.

resolved by changing init javascript

from:
keycloak.init().success().error()

to:
keycloak.init().then().catch()

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.



Solved by adding * as print screen below: