I heav the following bean
@RequestScoped
public class MyJWT {
@Inject
JsonWebToken jwt;
private User loggedUser;
private String rawToken;
@PostConstruct
public void init() {
if (jwt != null && jwt.getRawToken() != null) {
this.loggedUser = User.findByEmail( jwt.getClaim(Claims.email.name()).toString());
this.rawToken = jwt.getRawToken();
}
}
but I don't see init
is called ever. I mean, my debugger doesn't stop on any breakpoints inside. In case debugger is confused by instrumentation, I was also trying to add exception throwing inside, but didn't see any effect.
How is this possible?
question from:
https://stackoverflow.com/questions/65848190/postconstruct-is-not-called-in-requestscoped 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…