๐ป Programming/Personal Project
[๋ธ๋ก๊ทธ ๋ง๋ค๊ธฐ - 3] reactjs ํ๋ก ํธ์ java ๋ฐฑ์๋ ์ฐ๋
reactjs ํ๋ก ํธ์ java ๋ฐฑ์๋ ์ฐ๋
์ด๋ฒ์๋ ReactJS๋ก ๊ตฌํํ ํ๋ก ํธ์๋์ Java + ์คํ๋ง๋ถํธ๋ก ๊ตฌํํ ๋ฐฑ์๋๋ฅผ ์ฐ๋ํด๋ณด์์ต๋๋ค.
react๋ฅผ ์ฐ๋ ์ผ๋ฐ์ ์ธ ์๋ฐ์คํฌ๋ฆฝํธ ํ์ผ์ ์ฐ๊ฒฐํ๋ ๊ฒ๋ ์ ๋ชจ๋ฅด๊ฒ ๊ณ , ajax ํธ์ถ์ jquery๋ก๋ง ํ์๋๋ฐ fetch ๋ฉ์๋๋ฅผ ์ฐ๋ ๊ฒ์ด ๊ณต์๋ฌธ์์ ์์ ๋ก ๋์์์ด์ ๊ทธ๊ฑธ ์ด์ฉํ์ต๋๋ค.
๋ฐฑ์๋์ CORS ์ค์ ๋ ๋นผ๋จน์์๊ณ ์...
์ผ๋จ ํ๋ฉด์์ ๋ฐ๋ ์ ์ Blog > ๋ค์ด์ด๋ฆฌ ๋ฉ๋ด๋ฅผ ์ ํํ๋ฉด ๊ฒ์์ ์ํ ์ ๋ ฅ์ฐฝ๊ณผ ๋ฒํผ, ์๊ธ ๋ฑ๋ก์ ์ํ ๋ฒํผ์ ๋ฃ์๊ณ (๊ธฐ๋ฅ์ ์์ง ๊ตฌํ๋ชปํ๋ค์), ๋ฆฌ์คํธ ๋ชฉ๋ก ์กฐํํ๋ ๋ถ๋ถ๋ง ๊ฐ๋จํ๊ฒ ์ฐ๊ฒฐํด๋์์ต๋๋ค. ์์ค์ฝ๋๋ ๋ง์ด ์์ ํ๋๋ฐ ์ค์ ํ๋ฉด์์ ๋ฐ๋๊ฑด ๋ญ ์๋ค์ ใ กใ กใ
์์ผ๋ก ํ ์ผ๋ค์ ๋์ดํด๋ดค์ต๋๋ค.
- ๋ฑ๋ก๊ธฐ๋ฅ ํ๋ก ํธ ๊ตฌํ ๋ฐ ๋ฐฑ์๋์ ์ฐ๋
- ๊ฒ์๊ธฐ๋ฅ ๋ฐฑ์๋ ๊ตฌํ ๋ฐ ํ๋ก ํธ์ ์ฐ๋
- ๋ชฉ๋ก์ ํค๋์ ์ ๋ชฉ, ๋ด์ฉ, ์์ ์ผ ํ์
- ๋ด์ฉ์ ํ ์ค์ ๋๊ธฐ์ง ์๋๋ก ์ผ๋ถ๋ง ์ถ๋ ฅ๋๋๋ก ์์
- ๋ฑ๋ก์ผ์ ํ์ -> ๋ฐฑ์๋ ์์
- ๋ด๋ถ์ ์ผ๋ก๋ ์์ ์ผ์๋ ๊ด๋ฆฌ
- ๊ฒ์๊ธ ์ข์ธก์ ๊ฒ์๊ธ ๋ฒํธ ๋ฃ๊ธฐ -> ๋ชฝ๊ณ DB์ auto increment ๊ธฐ๋ฅ์ด ์์ด ์์ค๋ ๋ฒจ์์ ๊ตฌํํด์ผํจ
์ญ์ ํ๋ก ํธ์ ๋ฐฑ์๋๋ฅผ ํผ์ ํ๋ ค๋ ํ ์ผ์ด ๋๋ฌด ๋ง๋ค์ ใ ใ
๊ทธ๋๋ ์ฌ๋ฏธ์๊ฒ ๋ง๋ค์ด ๊ฐ๊ณ ์์ต๋๋ค.
์์ ํฐ์คํ ๋ฆฌ๊ฐ ์์ฒด๊ด๊ณ ๋ฅผ ๋ถ์ฌ์ ๊ด๊ณ ๊ฐ ์๊พธ ๋จ๋๊ฒ ๊ฐ๋ค์...๋ก๊ทธ์ธํ ๋๋ ๋จ๊ณ ...
๋นจ๋ฆฌ ๋ธ๋ก๊ทธ ์ฑ ๋ง๋ค์ด์ ๋ผ์ด๋ธํด์ ์ง์ ์ฌ์ฉํด๋ณด๊ณ ์ถ๋ค์
์ฐธ๊ณ ๋ฌธ์:
์คํ๋ง๋ถํธ CORS ์ค์ ํ๊ธฐ >> spring.io/guides/gs/rest-service-cors/#global-cors-configuration
Enabling Cross Origin Requests for a RESTful Web Service
this guide is designed to get you productive as quickly as possible and using the latest Spring project releases and techniques as recommended by the Spring team
spring.io
๋ฆฌ์กํธ ajax ํธ์ถํ๊ธฐ >> reactjs.org/docs/faq-ajax.html
AJAX and APIs – React
A JavaScript library for building user interfaces
reactjs.org
๋ฆฌ์กํธ ๋ถ๋ชจ์ํ ์ ๋ฐ์ดํธํ๊ธฐ >> stackoverflow.com/questions/35537229/how-to-update-parents-state-in-react
How to update parent's state in React?
My structure looks as follows: Component 1 - |- Component 2 - - |- Component 4 - - - |- Component 5 Component 3 Component 3 should display some data depending on state of Component 5....
stackoverflow.com
'๐ป Programming > Personal Project' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[GitHub] git clone, push์ Invalid username or password ์ค๋ฅ (0) | 2023.12.11 |
---|---|
[๋ธ๋ก๊ทธ ๋ง๋ค๊ธฐ -2] ๋ฐฑ์๋ CRUD ๋ง๋ค๊ธฐ (0) | 2020.11.25 |
[๋ธ๋ก๊ทธ ๋ง๋ค๊ธฐ - 1] ๋ ์ด์์ ๊ธฐํ (0) | 2020.11.21 |
[๋ธ๋ก๊ทธ ๋ง๋ค๊ธฐ] ๊ฐ์ธํ๋ก์ ํธ ์์ (๊ฐ์ธ๋ธ๋ก๊ทธ ๋ง๋ค๊ธฐ) (0) | 2020.11.19 |