์น๊ณต๋ทฐ/์คํ๋ง14 [jpa] mariadb ํ ์ด๋ธ ์์ฑ ์๋จ ๋ถ๋ช sts ์ ๋ก๊ทธ์๋ entity ๋ด์ฉ์ด create ๋๊ฒ์ผ๋ก ๋ณด์๋ค. ํ์ง๋ง mariadb hedisql ์์๋ ํ ์ด๋ธ์ด ์กด์ฌํ์ง ์์๋ค. ๊ทธ๋์ sts ๋ก๊ทธ์ ddl ๊ตฌ๋ฌธ์ heidisql์์ ์ง์ ์ ๋ ฅํ์ฌ ์คํํด๋ณด์์ผ๋ ์คํจ. ์ฝ์ง ํ ์๊ฒ๋ ์ฌ์ค ํ ์ด๋ธ ์ปฌ๋ผ ์ด๋ฆ์ค "desc" ๋ผ๋ ์ปฌ๋ผ๋ช ์ด ์์๊ณ ์ด๊ฒ์ mariadb์์ ์ฌ์ฉํ๋ ์ด๋ค ํค์๋์๋๊ฒ ๊ฐ๋ค. desc๋ฅผ description์ผ๋ก ๋ณ๊ฒฝํ๋ ํ ์ด๋ธ์ด ์ ์์ฑ๋๋ค... 2021. 8. 28. centos (๋ฆฌ๋ ์ค) ์คํ๋ง ๋ฐฐํฌ์, ๋ก๊ทธ ํ์ธ ์์น 1. ์ ์ ์กฐ๊ฑด - ํฐ์บฃ์ด ์ค์น๋์ด์์ด์ผํ๋ค. - ๊ทธ ๋๋ ํ ๋ฆฌ๊ฐ ์ด๋์ง ์๋ค. 2. ๋๋ ํ ๋ฆฌ ์์น - ๋ ๊ฐ์ ๊ฒฝ์ฐ๋ sftp๋ก binary ํ์ผ์ ์ฌ๋ฆฌ๊ณ , /usr/local/lib ์์น์ cpํ์๋ค. - ๊ทธ ํ์ ์์ถ ํ์ผ์ ์ด๊ณ ./shutdown, ./startup ํจ. 3. ๋ก๊ทธ ํ์ผ ์์น - {ํฐ์บฃ ์ค์น์์น}/logs ์ ์์. 2021. 7. 20. [jpa] ์ธ๋ํค๋ก ์กฐํ, entity ๊ฐ์ฒด๋ก ์กฐํ 1. DatasetDetail ํ ์ด๋ธ dataset_id๋ฅผ ์ธ๋ํค๋ก ๊ฐ์ง๊ณ ์๋ ์์ฒญ ํ ์ด๋ธ์ 2. ์ฟผ๋ฆฌ๋ฌธ์ผ๋ก ์ ์คํ๋๋์ง ์ฒดํฌ SELECT * FROM datasetDetail WHERE dataset_id = 59 3. repository ํด๋์ค์์ ์ฟผ๋ฆฌ ์คํํ๋ ค๊ณ ํ์ผ๋ ์คํจํจ. public List findByDatasetId(Long id) { //System.out.println("dataset id : " + dataset.getId()); return em.createQuery("select d from DatasetDetail d where d.dataset = :dataset", DatasetDetail.class) .setParameter("dataset", id) .getResul.. 2021. 7. 16. DI(Dependency Injection) - ๊ฐ์ฒด ์์ฑ์ ์ด๋์ ์ด๋ป๊ฒ ํ๋๋ ์คํ๋ง ํ๋ ์์ํฌ์์๋ Container(IoC)๋ฅผ ๋ง๋ค์ด ๋๊ณ , ๊ทธ ์์์ ๊ฐ์ฒด(bean)๋ฅผ ์์ฑํ์ฌ ํ์ฉํ๋ค. ํ์ํ ๋๋ง๋ค ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ๊ฒ์ด ์๋๋ผ ๋ฆฌ์์ค์์ ๊ฐ์ฒด๋ฅผ ๊บผ๋ด ์ฌ์ฉํ๋ค๊ณ ์๊ฐํ๋ฉด ๋๋ค. Bean์ ์์ฑํ๋ ๋ฐฉ๋ฒ 1. xml ํ์ผ ์ด์ฉ public class MainClass { public static void main(String[] args) { //1. ๊ธฐ์กด ์๋ฐ ๋ฐฉ๋ฒ TransportationWalk tw = new TransportationWalk(); tw.move(); //2. xml ์ฌ์ฉ ๋ฐฉ๋ฒ GenericXmlApplicationContext ctx = new GenericXmlApplicationContext("classpath:appConfig.xml"); Tra.. 2021. 7. 6. ์ด์ 1 2 3 4 ๋ค์