Posts
Q&A
domain ์ data_source ๋ฅผ ๋ง๋๋ ์ด์ .
์ ๋ ์ง๋ฌธ์๋๊ณผ ์๊ฒฌ์ด ๋น์ทํ๋ฐ, RecipeDataSource interface๋ฅผ local๊ณผ, remote์์ ๊ณตํต์ผ๋ก ์ฌ์ฉํ๋๋ฐ ์ค์ ๋ก ํญ์ ๊ณตํต interface๋ฅผ ๊ฐ์ง๋ ์๋๋ค๊ณ ์๊ฐํฉ๋๋ค.domain์์ repository ๊ตฌํ์ฒด๋ฅผ ์ฃผ์ ๋ฐ์๋, repository๊ฐ local์ ์ฌ์ฉํ ์ง, remote๋ฅผ ์ฌ์ฉํ ์ง ์๋๋ฉด ๋๋ค ์ฌ์ฉํ ์ง ๋ฑ์ ์ ๊ฒฝ์ฐ์ง ์๋ฏ์ด data source๊ฐ ์ด๋ป๊ฒ ์ฒ๋ฆฌ๋๋์ง์ ๋ํด์๋ domain์์๋ ์ ๊ฒฝ์ฐ์ง ์์์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.RepositoryImpl์์ data source๋ฅผ ์ฌ์ฉํ๋ค๋ฉด, data ๋จ์์ test๋ฅผ ํด์ผํ๋ค๊ณ ์๊ฐํฉ๋๋ค.test๋๋ฌธ์ repository์ ๊ตฌํ์ฒด์ ๋ํ interface๊น์ง domain์ ๋๋๊ฑด ์ฃผ๊ฐ์ด ์ ๋๋๊ฒ๊ฐ์ต๋๋ค.
- Likes
- 0
- Comments
- 3
- Viewcount
- 400
Q&A
CLI๋ก ์งํ์ mysql ์ฐ๊ฒฐ
๊ทธ๋ฅ ํฌ๊ธฐํ๊ณ GUI๋ก ํ ๊น ํ๋ค๊ฐ๋ CLI ํด๋ณด๊ณ ์ถ์ด์.. ์ฐพ์๋ณด๋๋ฐ ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ๊ทธ๋ฆฌ๊ณ Jaws MySQL ์ config์ค password๋ ์ ์ ๋ฅผ ์์ฑํ ๋ ์ฌ์ฉํ๊ณ , port๋ ์ฌ์ฉํ์ง ๋ชปํ์์ต๋๋ค. 1. User(์ฌ์ง) 2. Database (์ฌ์ง) Jaws MySQL์์ ๋์จ ๊ฐ์ ์ฌ์ฉํด์ ์ฌ์ง 1๊ณผ ๊ฐ์ ์ ์ (efzuvkvci51trqf7)๋ฅผ ๋ง๋ค์ด ์ฃผ์์ต๋๋ค. ์ฌ์ง 2์ database(tzoi81meqqhe5256)๋ฅผ ๋ง๋ค์ด ๋๊ฐ์ด ํ ์ด๋ธ๊ณผ ๋ฐ์ดํฐ๋ฅผ ์์ฑํด ์ค ํ, ์ ์ ์๊ฒ ๋ชจ๋ ๊ถํ์ ๋๊ฒจ์ฃผ์์ต๋๋ค. ์ด๋ป๊ฒ connect๋ฅผ ์์ผ์ฃผ๋์ง ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. Heroku URL: https://mysql-web-practice.herokuapp.com/ 3. heroku logs --tail ํ์๋ ์๋์ ๊ฐ์ ๊ฒฐ๊ณผ๊ฐ ๋์ต๋๋ค. (์ฌ์ง) ์ ๊นํ ๋งํฌ๋ https://github.com/Jinwook-Song/mysql-practice-2021 ์ ๋๋ค.
- Likes
- 1
- Comments
- 7
- Viewcount
- 685




