What is the Spring DI equivalent of CDI's InjectionPoint?
问题 I would like to create a Spring's bean producer method which is aware who invoked it, so I've started with the following code: @Configuration public class LoggerProvider { @Bean @Scope("prototype") public Logger produceLogger() { // get known WHAT bean/component invoked this producer Class<?> clazz = ... return LoggerFactory.getLogger(clazz); } } How can I get the information who wants to get the bean injected? I'm looking for some equivalent of CDI's InjectionPoint in Spring world. 回答1: As