Created
January 18, 2012 14:09
-
-
Save keesun/1633158 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Configuration | |
| @EnableHello | |
| public class AppConfig { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Retention(value = RetentionPolicy.RUNTIME) | |
| @Import(HelloConfig.class) | |
| public @interface EnableHello { | |
| String name(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Configuration | |
| public class HelloConfig { | |
| @Bean | |
| public Hello hello() { | |
| Hello h = new Hello(); | |
| h.setName("Toby"); | |
| return h; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment