๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

ํ”„๋ ˆ์ž„์›Œํฌ2

[Spring Framework] CSRF ์ ์šฉ ์ง€๋‚œ ๋ฒˆ์— spring boot์— csrf๋ฅผ ์ ์šฉํ•˜๋Š” ํฌ์ŠคํŒ…์„ ์˜ฌ๋ ธ์—ˆ๋Š”๋ฐ ๊ทธ๋ƒฅ spring๊ณผ ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์ด ๋‹ฌ๋ผ ๋˜ ํฌ์ŠคํŒ…์„ ์˜ฌ๋ ค๋ณธ๋‹ค! [Spring Boot] spring security - CSRF ์ ์šฉ , +) ajax csrf ์ ์šฉ 1. gradle ํ˜น์€ maven์— 'spring-boot-starter-security' ์ถ”๊ฐ€ implementation 'org.springframework.boot:spring-boot-starter-security' org.springframework.boot spring-boot-starter-security 2.5.5 Spring S.. ynzu-dev.tistory.com web.xml์— dispactcher servlet์„ ๋“ฑ๋กํ•œ๋‹ค. appServlet.. 2021. 12. 14.
[Spring] Scheduler(์Šคํ”„๋ง ์Šค์ผ€์ค„๋Ÿฌ) ์„ค์ •ํ•˜๊ธฐ ์Šคํ”„๋ง์—์„œ ํŠน์ • ์‹œ๊ฐ„ ํ˜น์€ ๋ช‡ ๋ถ„, ๋ช‡ ์‹œ๊ฐ„ ๋งˆ๋‹ค ๊ธฐ๋Šฅ์„ ๋™์ž‘ ์‹œํ‚ค๋ ค๋ฉด Spring์—์„œ ์ œ๊ณตํ•˜๋Š” scheduler๋ฅผ ์ด์šฉํ•˜๋ฉด ๋œ๋‹ค. (Spring 3.1๋ถ€ํ„ฐ๋Š” Quartz์—†์ด ๊ฐ„๋‹จํ•˜๊ฒŒ ์Šค์ผ€์ค„๋Ÿฌ ๊ตฌํ˜„์ด ๊ฐ€๋Šฅํ•˜๋‹ค.) โ€‹ ๋จผ์ € applicationContext์— ์Šค์ผ€์ค„๋Ÿฌ๋ฅผ ๋“ฑ๋กํ•œ๋‹ค. (Component Scan์ด ์„ ์–ธ๋˜์–ด ์žˆ๋Š” ํŒŒ์ผ) applicationContext.xml (์š”์•ฝ) => testJob์˜ doJob ๋ฉ”์†Œ๋“œ๋ฅผ 30๋ถ„๋งˆ๋‹ค ์‹คํ–‰ํ•˜๋Š” ์Šค์ผ€์ค„๋Ÿฌ๋ฅผ ๋“ฑ๋กํ–ˆ๋‹ค. testJob์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค. TestJob.java @Service("testJob") public class TestJob { public synchronized void doJob() { System.out.println("###########.. 2021. 11. 30.
728x90
๋ฐ˜์‘ํ˜•