Giter Club home page Giter Club logo

demo's Introduction

โœจ Gradation header generated by Hong-JunHyeok

์†Œ๊ฐœ

์•ˆ๋…•ํ•˜์„ธ์š”. ์ „์ง€ํ™˜์ž…๋‹ˆ๋‹ค.

๋งค๋ฒˆ ์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ฐœ๋ฐœํ•˜๋ ค๊ณ  ํ•˜๋ฉด ์ดˆ๊ธฐ ํ™˜๊ฒฝ ์„ธํŒ… ๋•Œ๋ฌธ์— ๋งŽ์€ ์‹œ๊ฐ„์„ ์“ฐ๊ณค ํ•˜๋Š”๋ฐ์š”.
์ œ๊ฐ€ ๋งŒ๋“  ๋ฐ๋ชจ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ์ตœ๋Œ€ํ•œ ์Šคํ”„๋ง ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ๊ณตํ†ต์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์™€ ์„ค์ •๊ฐ’์„ ๋„ฃ์—ˆ์Šต๋‹ˆ๋‹ค.
์ œ ๋ฐ๋ชจ๋ฅผ ์ด์šฉํ•ด๋ณด๋‹ˆ ์ด๋Ÿฐ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋„ ํ•„์š”ํ•œ ๊ฒƒ ๊ฐ™๋‹ค, ์ด๋Ÿฐ ์„ค์ •๊ฐ’๋„ ํ•„์š”ํ•œ ๊ฒƒ ๊ฐ™๋‹ค. ํ•˜๋Š” ๋ถ€๋ถ„ issue๋กœ ์ œ์•ˆํ•ด์ฃผ์„ธ์š”.

๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ ๊ตฌ์„ฑ

- Dependencies

Spring Web
Spring Data JPA
querydsl-jpa
Lombok
Validation
H2 Database
Mockito
Swagger3, Swagger-ui
Spring REST Docs (Junit 5 + Mockito)
Spring REST Docs API specification Integration

์‹œ์ž‘ํ•˜๊ธฐ

  • git clone

    • git clone https://github.com/jyeonjyan/springboot-starter [your project name]
  • IntelliJ ์—์„œ ํ”„๋กœ์ ํŠธ ์ด๋ฆ„ ๋ฐ”๊พธ๊ธฐ

    1. Go to File >> Project Structure >> Project > Project Name Update project name with its new name
    2. Exit IntelliJ IDEA
    3. Edit contents of the following files
      • {project_root}/settings.gradle
      • {project_root}/.idea/.name (if exists)
    4. Open IntelliJ IDEA
    5. Refresh Gradle Project
    6. Change app package name like com.app.yourprojectname
    7. Change app entry point class name like YourApplication.java
    8. Run YourApplication.java

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„ค์ •

  • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๊ธฐ๋ณธ์ ์œผ๋กœ 8080 ํฌํŠธ์—์„œ ์‹คํ–‰๋ผ์š”.

  • H2 Database ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•

  • Querydsl ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•

    • IntelliJ ํ™˜๊ฒฝ์„ค์ •์—์„œ annotation processing ์„ ํ™œ์„ฑํ™” ํ•ด์š”.
    • Q-class๋ฅผ ์ƒ์„ฑํ•˜๋ ค๋ฉด Gradle ์ž‘์—…์ฐฝ์—์„œ Gradle/Tasks/other/compileQuerydsl.sh task๋ฅผ ๋ˆ„๋ฅด๊ฑฐ๋‚˜ ./gradlew clean build ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด์š”.
    • Q-class๋Š” project/build/generated/querydsl/ ์—ฌ๊ธฐ์— ์ƒ์„ฑ๋ผ์š”.
    • ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์—ฌ๊ธฐ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
  • Swagger ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•

    • Swagger ์„ค์ •์€ src/main/**/demo/config/SwaggerConfig.java ์— ์žˆ์–ด์š”.
    • ๊ธฐ๋ณธ์ ์œผ๋กœ @Profile("dev") dev profile ์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด๋’€์–ด์š”.
    • Swagger๋Š” http://localhost:8080/swagger-ui.html ์— ๋งˆ์šดํŠธ ๋ผ ์žˆ์–ด์š”.
    • ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์—ฌ๊ธฐ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
  • Spring REST Docs ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•

    • Swagger ๋Š” API ๋ฌธ์„œํ™” ๋„๊ตฌ๋กœ ์‚ฌ์šฉํ•˜๊ธฐ์—๋Š” ์•„์‰ฌ์šด ๋ถ€๋ถ„์ด ๋งŽ์•„์š”. ๊ทธ๋ž˜์„œ REST Docs์„ ์ค€๋น„ํ–ˆ์–ด์š”.
    • Controller Test ๋ฅผ ํ†ต๊ณผํ•ด์•ผ์ง€๋งŒ ๋ฌธ์„œ๊ฐ€ ๋งŒ๋“ค์–ด์ ธ์š”. ์˜ˆ์ œ๋Š” MockMvc, mockito, junit5 ๋กœ ํ…Œ์ŠคํŠธ ํ–ˆ์–ด์š”.
    • ํ…Œ์ŠคํŠธ๊ฐ€ ํ†ต๊ณผํ•˜๋ฉด build/generated-snippets/**์— ์Šค๋‹ˆํŽซ(.adoc)๋“ค์ด ์ƒ์„ฑ๋ผ์š”.
    • src/docs/asciidoc/**.adoc ์œผ๋กœ API spec ํŽ˜์ด์ง€๋ฅผ ๊ตฌ์„ฑํ•ด์ฃผ์„ธ์š”.
      • .adoc ํŒŒ์ผ ์ž‘์„ฑ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์—ฌ๊ธฐ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
    • ./gradlew build ์‹œ build/asciidoc/html5/**์— html๋กœ ๋ณ€ํ™˜๋œ API spec ํŽ˜์ด์ง€๊ฐ€ ์ƒ์„ฑ๋  ๊ฑฐ์˜ˆ์š”.
  • Spring REST Docs API spec ์‚ฌ์šฉํ•˜๋Š” ๋ฒ•

demo's People

Contributors

jyeonjyan avatar

Stargazers

ํ™์ค€ํ˜ avatar ๊น€ํ˜•๋ก avatar ์ •์‹œ์› avatar  avatar

Watchers

 avatar

demo's Issues

์ œ์•ˆํ•˜๊ธฐ ๐Ÿค”

โฌ‡๏ธ ๋” ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์€ ๊ธฐ๋Šฅ/์„ค์ •์„ ๋‚จ๊ฒจ์ฃผ์„ธ์š” ! (์ด์œ ๋ฅผ ์ ์–ด์ฃผ์‹œ๋ฉด ๋” ์ข‹์•„์š”)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.