springboot 로 restapi 를 만들일이 생겼다. 처음부터 끝까지 다만들려고 하니 시간이 너무 많이 걸릴것 같고 잘 만들어진 오픈소스가 있을것 같아 구글링하다가 jhipster (제이 힙스터) 라는 개발 플랫폼을 알게되었고, 정리가 잘되어 있는 사이트가 없어 정리한다.
JHipster 란?
“Hipster”는 미국에서 시작된 문화 용어로, 모던하고 일렉트로닉한 음악, 예술, 패션 등을 즐기는 청년층을 지칭하는 말이다.
또한 이들이 추구하는 것들을 “Hip”하다고 표현한다. 일반적으로 힙하다는건은 쿨하고 멋진것으로 생각되고,현대적이고 트렌디한 것을 의미하기도 한다. JHipster는 이러한 Hipster 문화에서 영감을 받아 “Java Hipster”라는 이름으로 만들어졌다. Java 개발자들이 모던한 기술과 개발 방법론을 적극적으로 적용하여 개발을 할 수 있도록 지원하는 도구를 만드는걸 지향하는듯 한다. “힙”한 자바 개발자가 되고 싶다면 한번 도전해 보시길…
INFO! Using bundled JHipster (node:13189) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./lib/util/" in the "exports" field module resolution of the package at /usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/package.json. Update this package.json to use a subpath pattern like "./lib/util/*". (Use `node --trace-deprecation ...` to show where the warning was created)
Application files will be generated in folder: /Users/gosu/jhipster _______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/ If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster _______________________________________________________________________________________________________________
? Which *type* of application would you like to create? (Use arrow keys) ❯ Monolithic application (recommended for simple projects) Gateway application Microservice application
어플리케이션 이름은 jhipster 라고 입력한다.
1
? What is the base name of your application? (jhipster)
WebFlux는 리액트에서 사용하는 녀석 같은데 vue를 사용할 예정이므로 N으로 설정한다. (엔터를 입력하면 default 가 N 이므로 선택하지 않는다.)
1
? Do you want to make it reactive with Spring WebFlux? (y/N)
자바패키지명은 각자 환경에 맞게 지정해주자 io.github.goodsaem.api
1
? What is your default Java package name? (com.mycompany.myapp)
인증방식은 JWT 인증방식으로 지정
1 2 3 4
? Which *type* of authentication would you like to use? (Use arrow keys) ❯ JWT authentication (stateless, with a token) OAuth 2.0 / OIDC Authentication (stateful, works with Keycloak and Okta) HTTP Session Authentication (stateful, default Spring Security mechanism)
데이터베이스는 마리아 디비로 선택한다. (SQL을 선택하고 두번째 MariaDB를 선택하면 된다.)
1 2 3 4 5 6 7
? Which *type* of database would you like to use? (Use arrow keys) ❯ SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) MongoDB Cassandra [BETA] Couchbase [BETA] Neo4j No database
개발 데이터베이스는 어떤걸 사용할건지 물어보는데 마리아 디비로 하자.
1 2 3 4
? Which *development* database would you like to use? H2 with disk-based persistence H2 with in-memory persistence ❯ MariaDB
캐쉬를 물어보는데 Ehcache를 선택한다.
1 2 3 4 5 6 7 8
? Which cache do you want to use? (Spring cache abstraction) (Use arrow keys) ❯ Ehcache (local cache, for a single node) Caffeine (local cache, for a single node) Hazelcast (distributed cache, for multiple nodes, supports rate-limiting for gateway applications) Infinispan (hybrid cache, for multiple nodes) Memcached (distributed cache) - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache! Redis (distributed cache) No cache - Warning, when using an SQL database, this will disable the Hibernate 2nd level cache!
하이버네이트 쿼리성능향상을 위해 2차캐시를 쓸건지 물어보는데 Y라고 선택한다.
1
? Do you want to use Hibernate 2nd level cache? (Y/n)
의존성 관리 도구는 maven을 선택한다.
1 2 3
? Would you like to use Maven or Gradle for building the backend? (Use arrow keys) ❯ Maven Gradle
jHipster Registry 설정여부를 물어보는데 우선 No로 선택한다.
1 2 3
? Do you want to use the JHipster Registry to configure, monitor and scale your application? (Use arrow keys) ❯ No Yes
기타 기술을 물어보는데 아무것도 선택하지 않는다.(엔터입력)
1 2 3 4 5
? Which other technologies would you like to use? (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed) ❯◯ Elasticsearch as search engine ◯ WebSockets using Spring Websocket ◯ Apache Kafka as asynchronous messages broker ◯ API first development using OpenAPI-generator
클라이언트 프레임워크는 vue를 선택하자.
1 2 3 4 5
? Which *Framework* would you like to use for the client? Angular React ❯ Vue No client
관리자 ui는 생성한다.
1
? Do you want to generate the admin UI? (Y/n)
관리자 theme은 Default JHipster를 선택한다.
1 2 3 4 5 6 7 8
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? (Use arrow keys) ❯ Default JHipster Cerulean Cosmo Cyborg Darkly Flatly Journal
다국어 지원을 물어보는 Y 를 선택한다.
1
? Would you like to enable internationalization support? (Y/n)
대표언어는 Korean을 선택한다.
1 2 3 4 5 6 7 8
? Please choose the native language of the application (Use arrow keys) ❯ Korean Marathi Myanmar Polish Portuguese (Brazilian) Portuguese Punjabi
추가언어는 English를 선택한다. (키보드 위 버튼을 눌러서 English가 나오면 스페이스 입력)
1 2 3 4 5 6 7 8
? Please choose additional languages to install (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed) ◯ Danish ◯ Dutch ❯◉ English ◯ Estonian ◯ Farsi ◯ Finnish ◯ French
테스트 프레임워크를 물어보는데 선택하지 않는다.
1 2 3 4 5
? Besides JUnit and Jest, which testing frameworks would you like to use? ❯◯ Cypress ◯ [DEPRECATED] Protractor ◯ Gatling ◯ Cucumber
마켓플레이스에서 추가 설치할것을 물어보는데 N을 선택한다.
1
? Would you like to install other generators from the JHipster Marketplace? (y/N)
? Which *type* of application would you like to create? Monolithic application (recommended for simple projects) ? What is the base name of your application? jhipster ? Do you want to make it reactive with Spring WebFlux? No ? What is your default Java package name? io.github.goodsaem.api ? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token) ? Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) ? Which *production* database would you like to use? MariaDB ? Which *development* database would you like to use? MariaDB ? Which cache do you want to use? (Spring cache abstraction) Ehcache (local cache, for a single node) ? Do you want to use Hibernate 2nd level cache? Yes ? Would you like to use Maven or Gradle for building the backend? Maven ? Do you want to use the JHipster Registry to configure, monitor and scale your application? No ? Which other technologies would you like to use? ? Which *Framework* would you like to use for the client? Vue ? Do you want to generate the admin UI? Yes ? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster ? Would you like to enable internationalization support? Yes ? Please choose the native language of the application Korean ? Please choose additional languages to install English ? Besides JUnit and Jest, which testing frameworks would you like to use? ? Would you like to install other generators from the JHipster Marketplace? No
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days for: CN=Java Hipster, OU=Development, O=io.github.goodsaem.api, L=, ST=, C=
Changes to package.json were detected. [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for io.github.goodsaem.api:jhipster:jar:0.0.1-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-failsafe-plugin is missing. @ line 323, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------< io.github.goodsaem.api:jhipster >------------------- [INFO] Building JHipster 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- frontend-maven-plugin:1.12.1:install-node-and-npm (install-node-and-npm) @ jhipster --- [INFO] Installing node version v16.17.0 [INFO] Unpacking /Users/gosu/.m2/repository/com/github/eirslett/node/16.17.0/node-16.17.0-darwin-x64.tar.gz into /Users/gosu/jhipster/target/node/tmp [INFO] Copying node binary from /Users/gosu/jhipster/target/node/tmp/node-v16.17.0-darwin-x64/bin/node to /Users/gosu/jhipster/target/node/node [INFO] Installed node locally. [INFO] Installing npm version 8.19.1 [INFO] Unpacking /Users/gosu/.m2/repository/com/github/eirslett/npm/8.19.1/npm-8.19.1.tar.gz into /Users/gosu/jhipster/target/node/node_modules [INFO] Installed npm locally. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.645 s [INFO] Finished at: 2023-03-27T21:53:26+09:00 [INFO] ------------------------------------------------------------------------ Using node installed locally v16.17.0 Using npm installed locally 8.19.1 npm WARN deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. > jhipster@0.0.0 prepare > husky install
husky - Git hooks installed
added 2016 packages, and audited 2017 packages in 2m
214 packages are looking for funding run `npm fund` for details