BAEL-5451 Code for the Finding All Beans with a Custom Annotation article (#12143)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.countingbeans.latestsspring;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class MyConfigurationBean {
|
||||
|
||||
@Bean
|
||||
@MyCustomAnnotation
|
||||
MyService myService() {
|
||||
return new MyService();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user