tl;drã»Goã®ä¾åæ§æ³¨å ¥ã¯æ®éã«è¡ãããããDIãã¼ã«ã¯ã¾ã 観測ç¯å²ã§ã¯æµ¸éãã¦ããªãã ã»ç´è¿åºãGoogle製GoåãDIãã¼ã«ãWireãã¯ã·ã³ãã«ãªAPIããã¼ã«ä½æã§æç¨ã ããä¾åãªãã¸ã§ã¯ãã®è¨å®ãè¤éåããã¨è¡¨ç¾æ§ã«éçããã ã»Goã«ããã¦ãDIãã¼ã«ã¯ãã種ã®ãã¬ã¼ã ã¯ã¼ã¯ã¨èªèãã¦æ éã«æ¡ç¨ãã¹ãåæï¼Goã®ä¾åæ§æ³¨å ¥ã¨èª²é¡Goã®ã³ã¼ããæ¸ãéãç¹ã«ä¸å®è¦æ¨¡ãè¶ ããAPIãæ¸ãéã¯ãä¾åãããªãã¸ã§ã¯ãã¨ããã®ãå¢ãããDBã¯ã©ã¤ã¢ã³ãããã¬ã¼ãå種ãã¸ãã¹ãã¸ãã¯ãå¼ã³åºããµã¼ãã¹å±¤ãªã©ãããã«è©²å½ããã ã¬ã¤ã¤ã¼åãããããã±ã¼ã¸æ§æã®ä¸ãããããä¾åãªãã¸ã§ã¯ããããããã¦ã³ã«æ³¨å ¥ãã¦ããããæ¹ã¯è¦éããããããã¹ãæã«ã¢ãã¯ã®APIã¯ã©ã¤ã¢ã³ããå·®ãè¾¼ã¿ãããã£ããã¨ããã¹ã¿ããªãã£ãåä¸ãããããã£ããä¾åæ§æ³¨å ¥ãè¡ããããããªã¬ã¤ã¤ã¼åãããæ§æã§ããªã
DroidKaigi 2019 Room1, 2019/02/08 14:50~15:20
How to debug Xdebug... or any other weird bug in PHP
Why is the subject of the story about Java support JDK?
Springã§Field InjectionããConstructor Injectionãæ¨å¥¨ãããçç±ã調ã¹ã¦ã¿ãã¡ã¢ã§ãã (2016/12/30) ãµã³ãã«ã³ã¼ãã«finalãã¤ããããã«ä¿®æ£ (2017/03/29) Immutabilityã«ã¤ãã¦è¿½è¨ --- 家ã§ãä¼ç¤¾ã§ãIntelliJã使ã£ã¦éçºãã¦ããã®ã§ããã Spring Bootã§@Autowired(@Inject)ã使ãã¨ä¸è¨ã®ãããªè¦åãåºãããã«ãªãã¾ããã è¦åå 容ãè¦ã¦ã¿ãã¨ããã£ã¼ã«ãã¤ã³ã¸ã§ã¯ã·ã§ã³ã¯æ¨å¥¨ããã¾ãããã¨ã®ãã¨ã ãField injection is not recommended.ã è¦åã®è©³ç´°ãè¦ã¦ã¿ãã¨ä¸è¨ã®ããã«æ¸ãã¦ããã¾ãã ãField injection is not recommended. Spring Team recommends: "Always use
DIã使ããªãç¶æ ã§ã¯UserRepositoryã¨ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®ç¾©ããã¦ããã®ã«ãããããããUserServiceã¯UserRepositoryImplã®åç §ãæã£ã¦ãã¾ããã ããã§ã¯ãã£ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãåé¢ããæå³ãããã¾ããã UserServiceãUserRepositoryã¤ã³ã¿ã¼ãã§ã¼ã¹ã ããåç §(ä¾å)ããããã«ããã°ãå ·ä½çãªå®è£ ã§ããUserRepositoryImplã®å¤æ´ã«å½±é¿ããããã¨ã¯ããã¾ããã ãã®åé¡ã解決ããã®ãDIã®ç®çã§ãã ããã§ã¯DIã®ã¤ã³ã¸ã§ã¯ã¿ãå ãã¦ãä¸è¨ã®ã¯ã©ã¹å³ãä¿®æ£ãã¾ãããã è¬ã®ã¤ã³ã¸ã§ã¯ã¿ã®ç»å ´ã«ããUserServiceããUserRepositoryImplã¸ã®åç §ããªããªãã¾ããã ããããã¤ã³ã¸ã§ã¯ã¿ã¯ä½ããã®æ段ã§ãµã¼ãã¹ã§ããUserRepositoryImpl(Dependency)ãã¯ã©ã¤ã¢ã³
DI ã®èªç±åº¦ã¯è«¸åã®å£ è¿ããããå®ããã¸ã§ã¯ãã§DIã³ã³ããï¼æ³¨1ï¼ãå°å ¥ãã¦ãããã¨ãã話ãã¡ãã»ãè³ã«ããããã«ãªãã¾ãããããã¨åæã«ããDIã³ã³ããã使ã£ãããã¸ã§ã¯ãã大å¤ãªãã¨ã«ãªã£ã¦ãããã¨ãã話ãè³ã«ããããã«ãªãã¾ãããDIã®é åãååã«äº«åãã¦ä½ã³ã¹ããé«å質ãå®ç¾ãã¦ããããã¸ã§ã¯ããããä¸æ¹ã§ãDIãå°å ¥ãã¦ã¿ãã®ã¯ããã®ã ããã©ãDIã®è¨å®ãã¡ã¤ã«ã大ãããªãããã¦ç®¡çããããªãããDIã使ã£ã¦ããã®ã«ããã¹ã¿ããªãã£ãå ¨ç¶åä¸ãã¦ããªãããªã©è¦å´ãã¦ããããã¸ã§ã¯ããããããã§ãããã®å·®ã¯ãã£ããã©ãããæ¥ãã®ã§ããããã DIã¯ãEJBãªã©ã¨æ¯ã¹ãã¨æ¯è¼çåã£ä»ããããæè¡ã§ã¯ããã¾ãããã»ãã®æè¡åæ§ã誤ã£ã使ãæ¹ã§ã¯ååã«åãçºæ®ã§ãã¾ãããDIã³ã³ããã¯é常ã«åç´æå¿«ãªæè¡ã§ã¯ããã¾ããããã®ã·ã³ãã«ãæ ã«èªç±åº¦ãé«ããã¾ãã¾ãªä½¿ãæ¹ãã§ãã¾ãããã®
é害
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}