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 | |
| @Import(HelloConfig.class) | |
| public class AppConfig { | |
| @Override | |
| public Hello hello() { | |
| Hello h = super.hello(); | |
| h.setName("Keesun"); | |
| return h; | |
| } | |
| } |
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
| @Configuration | |
| @EnableHello(name = "Keesun") | |
| 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
| @Configuration | |
| @EnableHello(type = "korean", name = "Keesun") | |
| 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(HeloIBDR.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 | |
| @EnableHello | |
| public class AppConfig implements NameConfigurer { | |
| @Override | |
| public void configure(Hello hello) { | |
| hello.setName("Thank you very much, Toby."); | |
| } | |
| } |
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
| (function(lab49) { | |
| function privateAdder(n1, n2) { | |
| return n1 + n2; | |
| } | |
| lab49.add = function(n1, n2) { | |
| return privateAdder(n1); | |
| }; |
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
| // calculator.js | |
| exports.add = function(n1, n2) { | |
| }; | |
| // app.js | |
| var calculator = require('./calculator'); | |
| calculator.add(2, 2); |
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
| define('calculator', ['adder'], function(adder) { | |
| return { | |
| add: function(n1, n2) { | |
| return adder.add(n1, n2); | |
| } | |
| }; | |
| }); |
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
| package echo; | |
| import org.vertx.java.core.Handler; | |
| import org.vertx.java.core.app.VertxApp; | |
| import org.vertx.java.core.buffer.Buffer; | |
| import org.vertx.java.core.net.NetServer; | |
| import org.vertx.java.core.net.NetSocket; | |
| /** | |
| * @author Keesun Baik |