Upgrade to Pro — share decks privately, control downloads, hide ads and more …

実践JHipster #jsug #sf_36

実践JHipster #jsug #sf_36

Spring Fest 2017で話した資料です。

Shinichi Kozake

November 24, 2017
Tweet

More Decks by Shinichi Kozake

Other Decks in Technology

Transcript

  1.  +)JQTUFSͰ͸.POPMJUIJDͳΞϓϦέʔγϣϯ ΋͘͠͸ɺϚΠΫϩαʔϏεΞϓϦέʔγϣϯΛબ୒Ͱ͖·͢ɻ ██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗

    ████████╗ ███████╗ ██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ ██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ http://www.jhipster.tech Welcome to the JHipster Generator v4.10.2 Documentation for creating an application: http://www.jhipster.tech/creating-an-app/ Application files will be generated in folder: /Users/s_kozake/develop/jissen-jhipster ? Which *type* of application would you like to create? (Use arrow keys) ❯ Monolithic application (recommended for simple projects) Microservice application Microservice gateway JHipster UAA server (for microservice OAuth2 authentication)
  2. [QOQQ [QOQQAYGD [QLJKRVUGT ,&.HKNG LJKRUVGTKORQTVKFN ,&.5VWFKQ FQYPNQCF KQPKEUVCTV UYCIIGTEQFGIGPIGPGTCVG #2+

    +10+%鰟%.+鱃≠鯷鰄鰙鰘 鱆鱻鲎鰟榼㉃鯽伂☹鰜∽㓱鰘鯾鰼 ⯻窚鰟鱙鲗鱻鲏鰳䠉㏰鰆鰽鰗鯵鰼鰟鰘 飢赙鰳鰎鰽鱃餿勤鰜鰊鰼鰙伂☹猳
  3. [QOQQ [QOQQAYGD [QLJKRUVGT ,&.HKNG LJKRUVGTKORQTVKFN ,&.5VWFKQ FQYPNQCF KQPKEUVCTV UYCIIGTEQFGIGPIGPGTCVG #2+

    [QOCPIGPGTCVQT鱃≠鯷鰄鰙鰘 9GD鱆鱻鲎鰟榼㉃鯽伂☹鰜∽㓱鰘鯾鰼猳
  4. [QOQQ [QOQQAYGD [QLJKRUVGT ,&.HKNG LJKRUVGTKORQTVKFN ,&.5VWFKQ FQYPNQCF KQPKEUVCTV UYCIIGTEQFGIGPIGPGTCVG #2+

    ,&.5VWFKQ鰘∽㓱鰈鰐,&.(KNG鱃 LJKRUVGTKORQTVLFN鱗鲂鲗鱭鰜蛋鱀鰌鰼鰙 鱪鯮鱺鲏⹻劊ɾ鱌鲗鱪鱇鱪鱇ɾ鱙鯮鱷鱝ɾ 9GD#2+ɾ%47&锨橃鱃畷揉∽㓱鰈鰗鰀鰽鰯鰊
  5. [QOQQ [QOQQAYGD [QLJKRUVGT ,&.HKNG LJKRUVGTKORQTVKFN ,&.5VWFKQ FQYPNQCF KQPKEUVCTV UYCIIGTEQFGIGPIGPGTCVG #2+

    UYCIIGTEQFGIGP鱃䠉鯵鰼鰄鰙鰘珮 9GD#2+鰟⹻劊鯼鰺#PIWNCT鰟 *662蒌⋂鱗鯮鱭鱃哋▶䠀㓱猳⊠┊猳
  6.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ #SPXTFS ,FZDMPBL

         ࠓ͔Β࡞੒͢ΔγεςϜߏ੒ BQQMJDBUJPOZNM BQQEFWZNM
  7.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ #SPXTFS ,FZDMPBL

         ࠓ͔Β࡞੒͢ΔγεςϜߏ੒ BQQMJDBUJPOZNM BQQEFWZNM ͜ͷߏ੒Ͱ)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BUJPOZNM  TPVSDF\   ^ ^> ^ BQQMJDBUJPOZNM BQQEFWZNM
  12.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS +)JQTUFS3FHJTUSZ,FZDMPBL BQQMJDBUJPOZNM BQQEFWZNM DVSM9(&5= IUUQBENJOBENJO!MPDBMIPTUDPOpH BQQEFWNBTUFS

    \ OBNFBQQ  QSPpMFT<EFW>  MBCFMNBTUFS  WFSTJPOOVMM  TUBUFOVMM  QSPQFSUZ4PVSDFT<\ OBNFpMFDFOUSBMDPOpHBQQEFWZNM  TPVSDF\ BQQIFMMP+)JQTUFS ^ ^ \ OBNFpMFDFOUSBMDPOpHBQQMJDBUJPOZNM  TPVSDF\  
  13.  ██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗

    ██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ ██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ http://www.jhipster.tech Welcome to the JHipster Generator v4.10.2 Documentation for creating an application: http://www.jhipster.tech/creating-an-app/ Application files will be generated in folder: /Users/s_kozake/develop/jissen-jhipster ? Which *type* of application would you like to create? Monolithic application (recommended for simple projects) ❯ Microservice application Microservice gateway JHipster UAA server (for microservice OAuth2 authentication) ͜͜Ͱ͸ɺ .JDSPTFSWJDFBQQMJDBUJPO Λબ୒͠·͢ɻ
  14.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS ,FZDMPBL   "QQ BQQMJDBUJPOZNM BQQEFWZNM

    ɾίϯϑΟΪϡϨʔγϣϯऔಘ ɾ&VSFLB4FSWFS΁ͷొ࿥ "QQ 
  15.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS ,FZDMPBL   "QQ BQQMJDBUJPOZNM BQQEFWZNM

    +)JQTUFS3FHJTUSZը໘͔Β "QQͷ৘ใΛϞχλϦϯάՄೳʂ "QQ 
  16.  ██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗

    ██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗ ██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝ ██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ http://www.jhipster.tech Welcome to the JHipster Generator v4.10.2 Documentation for creating an application: http://www.jhipster.tech/creating-an-app/ Application files will be generated in folder: /Users/s_kozake/develop/jissen-jhipster ? Which *type* of application would you like to create? Monolithic application (recommended for simple projects) Microservice application ❯ Microservice gateway JHipster UAA server (for microservice OAuth2 authentication) ͜͜Ͱ͸ɺ .JDSPTFSWJDFHBUFXBZ Λબ୒͠·͢ɻ
  17.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ ,FZDMPBL (BUFXBZ

    BQQMJDBUJPOZNM BQQEFWZNM     ɾίϯϑΟΪϡϨʔγϣϯऔಘ ɾ&VSFLB4FSWFS΁ͷొ࿥
  18.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ ,FZDMPBL (BUFXBZ

    BQQMJDBUJPOZNM BQQEFWZNM    #SPXTFS  +)JQTUFS3FHJTUSZಉ༷ʹ 0*%$ʹΑΔ440ೝূ
  19.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ #SPXTFS ,FZDMPBL

        "QQ BQQMJDBUJPOZNM BQQEFWZNM #RR鰜*GNNQ9QTNF #2+鱃飢赙
  20.  "QQʹ)FMMP8PSMEΛฦ͢"1*Λ௥Ճ @RestController @RequestMapping("/api") public class HelloResource { @Value("${app1.hello:World!}") String

    hello; @Value("${server.port}") String port; public HelloResource() {} @GetMapping("/hello") public String hello(Principal principal) { return String.format("Hello %s(%s): %s", hello, port, principal); } } )FMMP3FTPVSDFKBWB "QQ
  21.  "QQʹ)FMMP8PSMEΛฦ͢"1*Λ௥Ճ @RestController @RequestMapping("/api") public class HelloResource { @Value("${app1.hello:World!}") String

    hello; @Value("${server.port}") String port; public HelloResource() {} @GetMapping("/hello") public String hello(Principal principal) { return String.format("Hello %s(%s): %s", hello, port, principal); } } )FMMP3FTPVSDFKBWB "QQ %QPHKI5GTXGT鯼鰺 痏㉸鰈鰐]CRRJGNNQ_鰟甧
  22.  "QQʹ)FMMP8PSMEΛฦ͢"1*Λ௥Ճ @RestController @RequestMapping("/api") public class HelloResource { @Value("${app1.hello:World!}") String

    hello; @Value("${server.port}") String port; public HelloResource() {} @GetMapping("/hello") public String hello(Principal principal) { return String.format("Hello %s(%s): %s", hello, port, principal); } } )FMMP3FTPVSDFKBWB "QQ #RR鰟鲁鯮鱬䡋赀
  23.  "QQʹ)FMMP8PSMEΛฦ͢"1*Λ௥Ճ @RestController @RequestMapping("/api") public class HelloResource { @Value("${app1.hello:World!}") String

    hello; @Value("${server.port}") String port; public HelloResource() {} @GetMapping("/hello") public String hello(Principal principal) { return String.format("Hello %s(%s): %s", hello, port, principal); } } )FMMP3FTPVSDFKBWB "QQ 荙崝㎦⬒
  24.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ ,FZDMPBL (BUFXBZ

    BQQMJDBUJPOZNM BQQEFWZNM    #SPXTFS  )FMMP8PSME"1* Λϒϥ΢β͔Β (BUFXBZܦ༝Ͱ ݺͼग़͢ʂ
  25.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ ,FZDMPBL (BUFXBZ

    BQQMJDBUJPOZNM BQQEFWZNM    #SPXTFS  )FMMP8PSME"1* Λϒϥ΢β͔Β (BUFXBZܦ༝Ͱ ݺͼग़͢ʂ
  26.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO "QQ #SPXTFS ,FZDMPBL

        (BUFXBZ BQQMJDBUJPOZNM BQQEFWZNM )CVGYC[⍕鰠#PIWNCT 鱡鯮鱝鱗鯮鱭鰟鰰鱃甜㹄
  27.  export class HomeComponent implements OnInit { : hello =

    ''; onClick() { this.http.get('/app1/api/hello').subscribe( (res: Response) => this.hello = res.text(), (error) => this.hello = error ); } : } (BUFXBZ IPNFDPNQPOFOUUT
  28.  )FMMP+)JQTUFSͱදࣔ͞Ε·ͨ͠ʂʂ P ƅ˜ƅ P (BUFXBZ )FMMP+)JQTUFS   PSHTQSJOHGSBNFXPSLTFDVSJUZPBVUIQSPWJEFS0"VUI"VUIFOUJDBUJPO!

    1SJODJQBMBENJO$SFEFOUJBMT<1305&$5&%>"VUIFOUJDBUFEUSVF%FUBJMT SFNPUF"EESFTT UPLFO5ZQFCFBSFSUPLFO7BMVF50,&/(SBOUFE "VUIPSJUJFTP⒐JOF@BDDFTT VNB@BVUIPSJ[BUJPO 30-&@"%.*/ 30-&@64&3
  29.  +)JQTUFS3FHJTUSZ &VSFLB4FSWFS $POpH4FSWFS (BUFXBZ ;VVM1SPYZ 3JCCPO #SPXTFS ,FZDMPBL 

      "QQ✖ BQQMJDBUJPOZNM BQQEFWZNM #RR鱃┆鲁鯮鱬 鰘鰳鯷⃡鰕菈▶   "QQ