Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
๐ง Refactoring
@Configuration
ํด๋์ค์ CGLIB ํ๋ก์ ์ ๊ฑฐ@AutoConfiguration
์ ์ ์ฉํ์ฌ ์๋ ๊ตฌ์ฑ ํด๋์ค์์ ๋ช ํํ ํ์ต๋๋ค.๋ถํ์ํ Bean ๋ฑ๋ก ์ ๊ฑฐ
ApplicationTerminator
๋ฅผ ์ง์ ๋น์ผ๋ก ๋ฑ๋กํ์์ผ๋, ์ธ๋ถ์์ ์ง์ ์ฌ์ฉํ ์ผ์ด ์๋ ๋ด๋ถ ๊ตฌํ์ฒด์ด๋ฏ๋ก, ์ด๋ฅผ ์ ๊ฑฐํ๊ณSignalHandlerRegistrar
๋ฅผ ๋ฑ๋กํ ๋ ์ง์ ์์ฑํ๋๋ก ๋ณ๊ฒฝํ์์ต๋๋ค.ApplicationRunner ๊ธฐ๋ฐ์ผ๋ก Signal ํธ๋ค๋ฌ ๋ฑ๋ก ๋ฐฉ์ ๊ฐ์
@EventListener(ContextRefreshedEvent.class)
๋ฅผ ํ์ฉํ์ฌ Signal ํธ๋ค๋ฌ๋ฅผ ๋ฑ๋กํ์์ผ๋,ApplicationRunner
์ธํฐํ์ด์ค๋ฅผ ๊ตฌํํ๋ ๋ฐฉ์์ผ๋ก ์ ํํ์์ต๋๋ค.ApplicationRunner
๋ ์คํ๋ง ์ ํ๋ฆฌ์ผ์ด์ ์ด ์์ ํ ์ด๊ธฐํ๋ ํ ์คํ๋๋ ์ฝ๋ฐฑ ์ธํฐํ์ด์ค์ด๋ฏ๋ก,ApplicationStartingEvent
๋ฅผ ํ์ฉํ๋ ๋ฐฉ์๋ณด๋คApplicationRunner
๊ฐ ์๋์ ๋ ์ ๋ถํฉํ๋ค๊ณ ํ๋จํ์์ต๋๋ค.โค๏ธ Contributors
@joon6093
์ด๋ฒ ๋ฆด๋ฆฌ์ค์ ๊ธฐ์ฌํด์ฃผ์ ๋ชจ๋ ๋ถ๋ค๊ป ๊ฐ์ฌ๋๋ฆฝ๋๋ค!