๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๊ฐœ๋ฐœ์ƒํ™œ/Spring2

ํฌ๋ก  ์ผ๋ถ€ ์Šคํ…Œ์ด์ง€ ๋น„ํ™œ์„ฑํ™” ์ฒ˜๋ฆฌ ์—ฌ๋Ÿฌ ์Šคํ…Œ์ด์ง€๊ฐ€ ์žˆ์„ ๋•Œ ํŠน์ • ์Šคํ…Œ์ด์ง€๋Š” ์Šค์ผ€์ค„ ์‹คํ–‰ ์•ˆ๋˜๊ฒŒ ํ•˜๋Š” ๋ฐฉ๋ฒ• ๋ถ€ํŠธ 2.1๋ถ€ํ„ฐ ์ ์šฉ @Scheduled(cron = "${spring.scheduled.cron.test.job:-}") public void testBatchExecute() { testBatch.execute(); } ScheduleConfig.java ํฌ๋ก  ์„ค์ • ๊ฐ’ ์˜†์— :- ์ถ”๊ฐ€ ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’์ด ์—†์„ ๋•Œ๋Š” - ์ฒ˜๋ฆฌ๊ฐ€ ๋จ cron์—์„œ - ์ฒ˜๋ฆฌ๋Š” disable์„ ์˜๋ฏธ ํ”„๋กœํผํ‹ฐ ๊ฐ’์„ ์ฐธ์กฐํ•˜๋˜, ๋งŒ์•ฝ ํŠน์ • ์Šคํ…Œ์ด์ง€์— ํ•ด๋‹น ํ”„๋กœํผํ‹ฐ๊ฐ€ ์ •์˜๋˜์–ด ์žˆ์ง€ ์•Š์œผ๋ฉด ๊ธฐ๋ณธ๊ฐ’์œผ๋กœ -๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Šค์ผ€์ค„๋ง์„ ๋น„ํ™œ์„ฑํ™” ์Šค์ผ€์ค„ ์›ํ•˜์ง€ ์•Š๋Š” ์Šคํ…Œ์ด์ง€๋Š” ํ”„๋กœํผํ‹ฐ๋ฅผ ์„ค์ •ํ•˜์ง€ ์•Š์Œ์œผ๋กœ์จ disable ์ฒ˜๋ฆฌ๊ฐ€ ์™„๋ฃŒ๋จ. example application-local... 2024. 4. 4.
[Spring] boot์—์„œ Spring ๋ฒ„์ „ ํ™•์ธ Spring Boot ์‚ฌ์šฉ์ค‘์ธ๋ฐ Spring ๋ฒ„์ „ ์•Œ๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ, boot ๋ฒ„์ „์ด์•ผ pomํŒŒ์ผ์ด๋‚˜ ๋‹ค๋ฅธ ์„ค์ • ํŒŒ์ผ์— ์žˆ๋Š”๋ฐ ์Šคํ”„๋ง ๋ฒ„์ „์€ ์ฐพ์ง€ ๋ชปํ–ˆ๋‹ค. SpringBootVersion, SpringVersion ์‚ฌ์šฉ import org.springframework.boot.SpringBootVersion; import org.springframework.core.SpringVersion; ... String springVersion = SpringVersion.getVersion(); String bootVersion = SpringBootVersion.getVersion(); ... 2022. 3. 30.