This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dagger_2 [2018/12/24 15:06] – 만듦 ledyx | dagger_2 [2021/02/07 05:50] (current) – old revision restored (2018/12/24 15:10) ledyx | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| Dagger 공식 홈에 있는 CoffeeMaker 예제 단순화. | Dagger 공식 홈에 있는 CoffeeMaker 예제 단순화. | ||
| + | = pom.xml = | ||
| + | <sxh xml ; collapse: | ||
| + | ... | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ... | ||
| + | </ | ||
| = 주입 할 대상 = | = 주입 할 대상 = | ||
| Line 130: | Line 163: | ||
| </ | </ | ||
| + | |||
| + | = Context = | ||
| + | |||
| + | 먼저 Build를 하여 DI가 적용된 코드가 생성되도록 한다. | ||
| + | |||
| + | <sxh> | ||
| + | public class CoffeeApp { | ||
| + | public static void main(String... args) { | ||
| + | CoffeeComponent coffeeComponent = DaggerCoffeeComponent.create(); | ||
| + | coffeeComponent.maker().brew(); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ~ ~ ~ heating ~ ~ ~ | ||
| + | => => pumping => => | ||
| + | brew! | ||
| + | </ | ||