Skip to content

Conversation

@Seokyeong237
Copy link
Member

@Seokyeong237 Seokyeong237 commented Nov 28, 2023

๐Ÿ“ Summary

  • spring-doc์œผ๋กœ swagger ์—ฐ๊ฒฐ
  • jacoco๋ฅผ ์ด์šฉํ•œ ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€ ์ธก์ •
  • @lock ์–ด๋…ธํ…Œ์ด์…˜์œผ๋กœ ์กฐํšŒ์ˆ˜ API ๊ตฌํ˜„ (๋™์‹œ์„ฑ ๋ฌธ์ œ ํ•ด๊ฒฐ)

๐Ÿ‘ฉโ€๐Ÿ’ป Contents

[Swagger]
์Šค์›จ๊ฑฐ

[Jacoco]
1
2

[์กฐํšŒ์ˆ˜ API]
Jmeter๋ฅผ ์ด์šฉํ•˜์—ฌ 500๋ช…์˜ ์œ ์ €๊ฐ€ 5์ดˆ ๋™์•ˆ ์กฐํšŒํ•  ๋•Œ ์กฐํšŒ์ˆ˜๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์ฆ๊ฐ€ํ•˜๋Š”์ง€๋ฅผ ํ™•์ธํ•˜์˜€์Šต๋‹ˆ๋‹ค.
์กฐํšŒ์ˆ˜2
์กฐํšŒ์ˆ˜

@Seokyeong237 Seokyeong237 self-assigned this Nov 28, 2023
Copy link
Member

@DongGeon0908 DongGeon0908 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. DB๋ฝ์„ ๊ฑธ๋ฉด ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๋ฅผ ์ƒ๊ฐํ•ด๋ด์•ผ ํ•  ๊ฒƒ ๊ฐ™์•„์š”.
  2. ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๊ธฐ๋ฐ˜์œผ๋กœ ์ž‘์„ฑํ•˜์‹  ์ฝ”๋“œ์˜ ์ด์Šˆ๋ฅผ ํŒŒ์•…ํ•ด๋ณด๋Š” ๊ฒƒ๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”.

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'com.mysql:mysql-connector-j'
// Swagger ์„ค์ •
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฒ„์ „์„ ์ƒ์ˆ˜๋กœ ๊ด€๋ฆฌํ•˜๋ฉด, ๋‚˜์ค‘์— ํŽธํ•ด์š”,

Comment on lines +55 to 59
@Lock(LockModeType.PESSIMISTIC_WRITE)
@Query("UPDATE Todo t SET t.viewCount = t.viewCount + 1 WHERE t.id = :todoId")
public void updateViewCount() {
viewCount++;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Db์— ๋ฝ์„ ๊ฑธ๋ช… ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๋Š”?
๊ทธ๋ ‡๋‹ค๋ฉด, ๊ทธ๊ฒƒ์„ ํ•ด๊ฒฐํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ๋Š”!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants