IT/development212 [Spring]spring RedirectAttribute ๋ชฉ์ฐจ spring RedirectAttribute Model ํ์ ๊ณผ ๋๋ถ์ด์ ์คํ๋ง MVC๊ฐ ์๋์ผ๋ก ์ ๋ฌํด ์ฃผ๋ ํ์ ์ค์๋ RedirectAttribute ํ์ ์ด ์กด์ฌํจ RedirectAttribute๋ ์กฐ๊ธ ํน๋ณํ๊ฒ๋ ์ผํ์ฑ์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌํ๋ ์ฉ๋๋ก ์ฌ์ฉ๋จ RedirectAttribute๋ ๊ธฐ์กด์ Servlet์์ response.sendRedirect()๋ฅผ ์ฌ์ฉํ ๋์ ๋์ผํ ์ฉ๋๋ก ์ฌ์ฉ๋จ ์๋ ์ด๋ฏธ์ง์ฒ๋ผ RedirectAttribute๋ Model๊ณผ ๊ฐ์ด parameter๋ก ์ ์ธํด์ ์ฌ์ฉํ๊ณ addFlashAttribute(์ด๋ฆ, ๊ฐ) ๋ฉ์๋๋ฅผ ์ด์ฉํด์ ํ๋ฉด์ ํ๋ฒ๋ง ์ฌ์ฉํ๊ณ ๋ค์์๋ ์ฌ์ฉํ์ง ์๋ ๋ฐ์ดํฐ๋ฅผ ์ ๋ฌํ๊ธฐ ์ํด์ ์ฌ์ฉ๋จ ์ถ์ฒ: ์ฝ๋๋ก ๋ฐฐ์ฐ๋ ์คํ๋ง ์น ํ๋ก์ ํธ(๊ฐ์ ํ) IT/development 2022. 11. 27. [Spring]springframework Controller ๋ชฉ์ฐจ Spring Controller spring controller์ paramter ์์ง Controller๋ฅผ ์์ฑํ ๋ ๊ฐ์ฅ ํธ๋ฆฌํ ๊ธฐ๋ฅ์ parameter๊ฐ ์๋์ผ๋ก ์์ง๋๋ ๊ธฐ๋ฅ์, ์ด ๊ธฐ๋ฅ์ ์ด์ฉํ๋ฉด ๋งค๋ฒ request.getParameter()๋ฅผ ์ด์ฉํ๋ ๋ถํธํจ์ ์์จ ์ ์์ ์์ ๊ฐ์ด SampleDTO class๊ฐ ์๊ณ (Lombok ์ฌ์ฉ์ผ๋ก @Data ์ด๋ ธํ ์ด์ ์ผ๋ก ์๋์ผ๋ก setter, getter, toString method ์์ฑ) ์์ ๊ฐ์ด SampleController์ method๊ฐ SampleDTO๋ฅผ parameter๋ก ์ฌ์ฉํ๊ฒ ๋๋ฉด ์๋์ผ๋ก setter ๋ฉ์๋๊ฐ ๋์ํ๋ฉด์ parameter๋ฅผ ์์งํ๊ฒ ๋จ method์๋ @GetMapping์ด ์ฌ์ฉ๋์์ผ๋ฏ๋ก, ์๋์ ๊ฐ์ด ๋ธ.. IT/development 2022. 11. 27. [thyemeleaf] get query string parameter ๋ชฉ์ฐจ thyemeleaf์์ url์ query string ์ฌ์ฉ ๋ฏธ๋์ ์ด ๋ด์ฉ์ ์์์ ๋ด๊ฐ ๋ณด๊ธฐ ์ํด ๊ธฐ๋กํจ ์ ์ฌ์ง์์์ฒ๋ผ url์ด http://localhost:8080/tables/detail?tableName=tb_menu ์ผ ๊ฒฝ์ฐ ๋ค๋ฅธ ํ์ด์ง ์ด๋ ์ query string parameter๋ฅผ ๊ฐ์ ธ์์ get์ผ๋ก ๋๊ธฐ๊ณ ์ถ์ ๋ ์๋์ฒ๋ผ ์ฌ์ฉํ๋ฉด ๋๋ค. ํ๋์ถ๊ฐ ${param.parameter} ์ด ๋ถ๋ถ์ด๋ค. ์ฌ๋ฌ๊ฐ๋ฅผ ๋๊ธฐ๊ณ ์ถ์ ๋ ์๋์ฒ๋ผ ํ๋ฉด ๋๋ค. ${param.fields[index]} test1 test2 test3 ๊ทธ๋ฌ๋ฉด ์๋์ฒ๋ผ ํ๋์ถ๊ฐ ํ์ด์ง ์ด๋ ์ ์ฟผ๋ฆฌ์คํธ๋ง์ด ์ ๋ฌ๋จ์ ํ์ธ ํ ์ ์๋ค. Reference: https://attacomsian.com/blog/thymel.. IT/development 2022. 11. 27. [Spring]pom.xml์์ dependency ์ค์ ํด ์คฌ๋๋ฐ ํด๋น ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ๋ค์ด์ด ์๋๋ ๊ฒฝ์ฐ ๋ชฉ์ฐจ ๋ณดํต ๋ก์ปฌ repository์์ ๋ด์ฉ์ ์ง์ฐ๊ณ ๋ค์ ๋ค์ด์ ๋ฐ๊ฑฐ๋ ํ๋ ๋ฐฉ์์ผ๋ก ํด๊ฒฐ์ด ๋๋๋ฐ ํ๋คํ๋ค ์๋๋ฉด maven์์ ์ฐธ์กฐ๋ฅผ ๋ชปํ๋ .jarํ์ผ์ "ํ๋ก์ ํธ/src/main/webapp/WEB-INF/lib ๋๋ ํฐ๋ฆฌ์ ๋ฃ๊ณ pom.xml์์ propertiesํ๊ทธ์ ์๋์ฒ๋ผ jarํ์ผ์ ๋ฃ์ lib๋๋ ํฐ๋ฆฌ๋ฅผ ์ค์ ํด์ค 4.2.4.RELEASE 3.7.0 ${project.basedir}/src/main/webapp/WEB-INF/lib ๊ทธ ๋ค์ dependency๋ฅผ ํด๋น lib๋๋ ํฐ๋ฆฌ์ jar๋ก ์ค์ org.springframework.webmvc org.springframework.webmvc-4.2.4 4.2.4 system ${project.lib.path}/spring-webmvc-.. IT/development 2022. 11. 26. [Spring]์คํ๋ง ํ๋ก์ ํธ ์ดํด๋ฆฝ์ค์์ ํ๋ก์ ํธ๋ช ๋ณ๊ฒฝ ์ tomcat ์๋ฌ ๋ชฉ์ฐจ web.xml์ ํ๊ทธ๋ช ์ด ๋ณ๊ฒฝ๋์ด์ ์๋ฌ ๋๋ ๊ฒฝ์ฐ ๋ก๊ทธ๋ ์๋์ ๋น์ทํจ..๋ก๊ทธ๋ฅผ ๋ณด๋..์ด๋ฏธ ์ ์๋์ด ์๋ค๊ณ ํ๋ค. ์์ธ์ ์๋์ ๊ฐ์ด web.xml์ xmlns๊ฐ ์ค๋ณต๋์ด ์์์ ๊ทธ๋ฆฌ๊ณ web.xml์๋จ์ web-app์์ ์ด๋ฏธ id๊ฐ๋ ์ค์ ํ๊ธฐ์ ์ ์ผ ๋ง์ง๋ง ์ค์ id๋ ์ญ์ ๋ฅผ ํด์ผ ์ ์์ ์ผ๋ก tomcat์ ๊ตฌ๋ํ ์ ์์ IT/development 2022. 11. 26. [ExtJS]Ext JS ๋ชฉ์ฐจ ๋ฐ์ดํฐ ๊ฒฐ๊ณผ๊ฐ์ dataStore์ param๊ฐ์ผ๋ก ์ ๋ฌํ๋ ๋ฐฉ๋ฒ Store.proxy.extraParams = action.result.data; // ajax๋ก ์กฐํํด ์จ action.result.data๋ฅผ store.proxy.extraParams์ ์ ์ฅํ๋ฉด ์ ๋ฌ๋จ Store.load(); // ๋ฐ์ดํฐ์คํ ์ด์์ loadํด์ ์ฌ์ฉ store์ ์ ์ฅ๋ ๋ฐ์ดํฐ ์ ๋ถ ์ถ์ถ // ์คํ ์ด๋ฅผ ๋ฐ๋ณต๋ฌธ ๋๋ ค์ ๋ฐ์ดํฐ๋ฅผ ์ ๋ถ store.each(function(rec) { // getData(); ์ด์ฉํด์ ๋ฐ์ดํฐ๋ง ์ ๋ถ ๋ฝ์ ์ฌ ์ ์์ var recData = rec.getData(); }); ์ถ์ฒ : https://stackoverflow.com/questions/21643086/retrieve-set-of.. IT/development 2022. 11. 26. [Maven]maven https ์ด์ ๋ชฉ์ฐจ maven ์ ์ฅ์๊ฐ https๋ก ๋ฐ๋๋ฉด์ jdk๊ฐ 1.7์ธ ๊ฐ๋ฐํ๊ฒฝ์์ ๋น๋๊ฐ ์คํจํ๋ ๊ฒฝ์ฐ๊ฐ ์์ ์ฌ๋ฌ๊ฐ์ง ๋ฐฉ๋ฒ์ด ์์ง๋ง ๋ก์ปฌ์์ ํ ์ ์๋ ๊ฐ์ฅ ์ฌ์ด ๋ฐฉ๋ฒ์ jdk ๋ฒ์ ์ 1.8๋ก ์ฌ๋ฆฌ๋ ๋ฐฉ๋ฒ์ธ๋ฐ IDE์์ jdk๊ฐ ์ฌ๋ฌ๊ฐ ์ค์น๋ ๊ฒฝ์ฐ ์๋์ฒ๋ผ 1.8๋ก ์ค์ ํ ๋น๋ ํ ๊ฒ ์ถ์ฒ : https://egovframe.go.kr/home/faqinfo/faqinfoRead.do?menuNo=68&faqId=FAQ_0000000000000761 IT/development 2022. 11. 26. [WebServer]Apache Web Server SSL ์ค์ ๋ชฉ์ฐจ APACHE SSL ์ค์นํ๋ ๋ฒ ๐ ๋ฐฉํ๋ฒฝ ํ์ฉ(443 port) SSL ์ธ์ฆ์์ ssl_auth.sh ํ์ผ httpd.conf, ssl.conf ssl ์ธ์ฆ์(SSLCertificateFile, SSLCertificateKeyFile, SSLCertificateChainFile)์ ssl_auth.sh ํ์ผ์ ์ ํด์ง ๊ฒฝ๋ก์ ์์น ex) /WebServer/APACHE/jboss-ews-2.1/httpd/ssl ํด๋ ๋ฐ์ ์์น ssl.conf(์น์๋ฒ์ ํ๊ฒฝ์ค์ ํ์ผ - ssl์ค์น ๊ด๋ จ ์ ๋ณด) ํ์ผ์ ์๋ฒ์ ๋งก๊ฒ ์ค์ ex) /WebServer/APACHE/jboss-ews-2.1/httpd/conf.d ํด๋ ๋ฐ์ ์์น Listen 443 ์ฃผ์ ํด์ NameVirtualHost *:443 ์ฃผ์์ฒ๋ฆฌ ํ .. IT/development 2022. 11. 26. [IDE]eclipse workspace ๋ณ๊ฒฝ ๋ชฉ์ฐจ eclipse workspace ๋ณ๊ฒฝ eclipse - file - switch workspace - others ์ ํํด์ ๋ณ๊ฒฝํ ํด๋๋ฅผ ์ ํํด์ ๋ณ๊ฒฝํ๋ฉด ๋จ(์๋ ์ด๋ฏธ์ง ์ฐธ์กฐ) ์ด ๊ฒฝ์ฐ ๊ธฐ์กด์ ํ๊ฒฝ์ด ์ด๊ธฐํ๊ฐ ๋๋๋ฐ ๊ธฐ์กด๊ณผ ๋์ผํ ํ๊ฒฝ์ผ๋ก ์์ ํ๊ณ ์ถ์ ๊ฒฝ์ฐ ๊ธฐ์กด ์ํฌ์คํ์ด์ค์ ".metadata" ํด๋๋ฅผ ๋ณ๊ฒฝํ ํด๋์ ๋ณต์ฌํ๋ฉด ๋จ ๊ทธ๋ฆฌ๊ณ tomcat ์ค์ ๋ ๋์ผํ๊ฒ ์ฌ์ฉํ๋ ค๋ฉด ๊ธฐ์กด workspace์ Servers ํด๋๋ ๋ณต์ฌ ํ๋ฉด ๋จ ๊ทธ๋ฅ ๊ธฐ์กด์ workspace ํด๋์์ .metadata์ Serversํด๋๋ฅผ ๋ณต์ฌํด์ ์ฌ์ฉํ์(์๋ ์ด๋ฏธ์ง ์ฐธ์กฐ) IT/development 2022. 11. 25. [IDE]eclipse์์ tomcat ์คํ ์ ๋ก๊ทธํ์ผ ์ ์ฅ ๋ชฉ์ฐจ eclipse์์ tomcat ์คํ ์ ๋ก๊ทธํ์ผ ์ ์ฅ ์ดํด๋ฆฝ์ค์ tomcat - overview ์คํ ํ open launch configuration ์ ํ ์ฐ์ธก์ common - Output File ์ ํ ํ File System(๊ฒฝ๋ก ์ง์ ์ง์ ) ํน์ Workspace(๋ง ๊ทธ๋๋ก ์ดํด๋ฆฝ์ค์ Workspace)์ ๋ก๊ทธ๋ฅผ ๋จ๊ธธ ํ์ผ๋ช ์ ์ง์ ํ ok IT/development 2022. 11. 25. ์ด์ 1 ยทยทยท 13 14 15 16 17 18 19 ยทยทยท 22 ๋ค์