[๊ฐ์] ์น๊ฐ๋ฐ์ ๋ด, Spring 4์ฃผ์ฐจ
https://developers.naver.com/docs/search/shopping/
๊ฒ์ API ์ผํ ๊ฒ์ ๊ฐ๋ฐ๊ฐ์ด๋
NAVER Developers - ๊ฒ์ API ์ผํ ๊ฒ์ ๊ฐ๋ฐ๊ฐ์ด๋
developers.naver.com
์ด๊ณณ์์ API์ฌ์ฉ ์
์ฒญ์ ํ๊ณ ๋ฐ์ ID์ Secret ํค?๋ฅผ ํค๋๋ก ๋ฃ์ด์
์์ง์ UTF-8์ธ์ฝ๋ฉ์ด ์๋ผ์ ์ฟผ๋ฆฌ๋ฅผ ์์ด๋ก๋ฐ์ ๋ชป ๋ฃ๋๋ค.
query์ &sort๋ฑ์ผ๋ก ์ํ๋ ๊ฒ์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ์ ์ ์๋ค. ๋ชจ๋ ์์ ๋งํฌ์ ๋์จ ๋ด์ฉ์ด๋ค.
๋ํ ์ฝ๋์ค๋ํซ -> ์๋ฐ์์ ์๋ฐ ์ฝ๋๋ฅผ ๋ฐ์ ์ ์๋ค.
https://mvnrepository.com/artifact/org.json/json/20160810
์ฌ๊ธฐ์ org.json ํจํค์ง๋ฅผ ์ค์นํด์จ๋ค. ๊ฒ์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ์ ๊ฒ
์ปดํฌ๋ํธ ๋ฑ๋ก @Component
๊ฒ์์ Controllser์์ ๊ฐ์ ธ๋ค ์จ์ผ ํ๋ค. -> ์คํ๋ง์ด ํ์ํ ํด๋์ค๋ฅผ ์ ์ ์๋๋ก ๋ฑ๋กํ๊ธฐ
๊ฒ์ ๋ง๋ค๊ธฐ
๊ฒ์์ด ๋ฐ์์ ๋ณด๋ด์ค๋ค.
๊ด์ฌ ์ํ ๋ณด์ฌ์ฃผ๊ธฐ
isgood ${product.lprice > product.myprice ? 'none' : ''
@Scheduled(cron = "0 0 1 * * *") : ๋งค์ผ 1์์ ์คํํ๋ผ(0~23)