TIL 9

[Deploy] ์›น ์‚ฌ์ดํŠธ ๋ฐฐํฌ ํ”Œ๋žซํผ

๊ณผ๊ฑฐ ์›น์‚ฌ์ดํŠธ ๋ฐฐํฌ ์ž‘์„ฑ๋œ ํ”„๋กœ๊ทธ๋žจ์„ ๋Œ๋ฆฌ๋Š” ์„œ๋ฒ„๋ฅผ ๋‘๊ณ , ์ง์ ‘ ํ•˜๋“œ์›จ์–ด๋‚˜ ์šด์˜์ฒด์ œ ๊ทธ์™ธ ๋ชจ๋“  ๋ถ€๋ถ„์„ ์ง์ ‘ ๊ด€๋ฆฌ Iaas (Infrastructure as a Service) AWS, Azure ๊ฐ™์€ ํด๋ผ์šฐ๋”ฉ ์ปดํ“จํŒ… ์„œ๋น„์Šค ๋“ฑ์žฅ ์„œ๋ฒ„ ์ธํ”„๋ผ๋“ค์„ ๊ณต๊ธ‰ ์—…์ฒด์—์„œ ๊ด€๋ฆฌํ•˜๊ณ , ์‚ฌ์šฉ์ž๋Š” ์‰ฝ๊ฒŒ ์›น ๋ฐฐํฌ ๊ฐ€๋Šฅ ์„œ๋ฒ„ ์ธํ”„๋ผ๋ฅผ ๊ตฌ์„ฑํ•˜๊ณ  ์›น์„ ๋ฐฐํฌํ•˜๋ฉด 24์‹œ๊ฐ„ ์ฝ”๋“œ ๊ตฌ๋™ Faas (Functions as a Service) AWS lambda๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ํ•˜๋Š” ํ”Œ๋žซํผ ์„œ๋ฒ„๋ฆฌ์Šค : ์œ„์˜ IaaS์ฒ˜๋Ÿผ ์„œ๋ฒ„๋ฅผ ๊ด€๋ฆฌํ•  ํ•„์š”๋„ ์—†์ด ํด๋ผ์šฐ๋“œ ์ œ๊ณต์—…์ฒด์— ๋ฆฌ์†Œ์Šค(ํ”„๋กœ๊ทธ๋žจ)๋งŒ ํ• ๋‹นํ•˜๋ฉด, ๋ฐ”๋กœ ํ”„๋กœ๋•์…˜ ํ™˜๊ฒฝ์œผ๋กœ ๋ฐฐํฌ e.g. Netlify, Vercel ํ”„๋กœ์ ํŠธ๋ฅผ ์—ฌ๋Ÿฌ๊ฐœ์˜ ํ•จ์ˆ˜๋กœ ์ชผ๊ฐœ์„œ -> ๋งค์šฐ ๊ฑฐ๋Œ€ํ•˜๊ณ  ๋ถ„์‚ฐ๋œ ์ปดํ“จํŒ… ์ž์›์— ํ•จ์ˆ˜๋ฅผ ๋“ฑ๋ก..

TIL 2024.03.22

[TIL] AWS ์™€ Docker

DevOps ? - ์†Œํ†ต, ํ˜‘์—…, ํ†ตํ•ฉ ๋ฐ ์ž๋™ํ™”๋ฅผ ๊ฐ•์กฐํ•˜๋Š” ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ๋ฐฉ๋ฒ•๋ก  - ๊ฐœ๋ฐœ๊ณผ ์šด์˜์ด ์ƒํ˜ธ์˜์กด์ ์œผ๋กœ ๋Œ€์‘ํ•ด์•ผ ํ•œ๋‹ค๋Š” ์˜๋ฏธ - ๊ฐœ๋ฐœ๊ณผ ์šด์˜ ์‚ฌ์ด์˜ ์—ญํ•  AWS ํด๋ผ์šฐ๋“œ ์„œ๋ฒ„ ๊ตฌ์ถ• ์„œ๋น„์Šค ์ „ํ†ต์  IDC(International Data Corporation) ์ ์ฐจ ํด๋ผ์šฐ๋“œ ์„œ๋น„์Šค ์ค‘์š”๋„ ์ฆ๋Œ€ ์žฅ์  ํƒ„๋ ฅ์ ์ธ ์›น ๊ทœ๋ชจ ์ปดํ“จํŒ… ๋‹ค์–‘ํ•œ Command(API) ์ œ๊ณต ์œ ์—ฐํ•œ ํด๋ผ์šฐ๋“œ ํ˜ธ์ŠคํŒ… ์„œ๋น„์Šค ํ†ตํ•ฉ ์•ˆ์ •์„ฑ ๋ณด์•ˆ ๋‹จ์  ๋ฒ ์–ด ๋ฉ”ํƒˆ ์„ฑ๋Šฅ์„ ์›ํ•  ๋•Œ ์›น ํŽ˜์ด์ง€๊ฐ€ ๋ช‡๊ฐœ ๋ฟ์ผ ๋•Œ ์†”๋ฃจ์…˜ > ํ”Œ๋žซํผ ์ ํ•ฉ ๊ฐ€๊ฒฉ AWS ์˜ ์ข…๋ฅ˜ Server Storage DataBase Management Analysis EC2(Elastic Compute Cloud) Lambda VPC(Virtual Private Cloud) ..

TIL 2024.01.25

spring ) pathVariable URL ํŠน์ˆ˜๋ฌธ์ž ๋ฐ›๊ธฐ

#์ฐธ๊ณ  https://soheemon.tistory.com/entry/Spring-RestController%EC%97%90%EC%84%9C-PathVariable%EB%A1%9C-email%EC%9D%84-%EB%84%98%EA%B8%B8%EB%95%8C-%EC%9D%B4%EC%8A%88 Spring, RestController์—์„œ @PathVariable๋กœ email์„ ๋„˜๊ธธ๋•Œ ์ด์Šˆ. Controllerํ…Œ์ŠคํŠธ๋ฅผ ํ–ˆ์„๋•Œ email์˜ ํŠน์ • url์— ๋Œ€ํ•ด 406 ์—๋Ÿฌ ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค. (soheemon@test.co.kr์€ 200OK ๋ฐ˜๋ฉด soheemon@test.com์€ 406 error ๋ฐœ์ƒ.) "/isAlreadMember/{email:.+}" ์Šคํ”„๋ง์ด .์„ ๊ธฐ.. soheemon.tistory..

TIL 2022.01.26

java ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ • (mac m1)

spring ์„ค์น˜์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋‚˜์„œ ์ž๋ฐ”์™€ jdk ๋ฒ„์ „์„ ๋‹ค์‹œ ๊นŒ๋Š” ์ผ์ด ์ƒ๊ฒผ๋Š”๋ฐ, ๊ทธ๋•Œ๋งˆ๋‹ค ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •์ด ์ƒ๊ฐ์ด ์•ˆ๋‚˜์„œ ๊ธฐ๋กํ•ด๋‘๋ ค๊ณ  ํ•œ๋‹ค. ๊ฒ€์ƒ‰ํ•ด๋ณด๋ฉด ์—ฌ๋Ÿฌ ๋ฐฉ๋ฒ•์ด ๋‚˜์˜ค๋Š”๋ฐ, terminal ์‚ฌ์šฉ์ด ์ต์ˆ™ํ•˜์ง€ ์•Š์•„์„œ์ธ์ง€ ๋ฐฑํ”„๋กœ ์ดํ•ด๋ฅผ ๋ชปํ•ด์„œ ์„ค์ •์— ๋ฒ„๋ฒ…์ด๋Š”๋ฐ, ์ด ๋ธ”๋กœ๊ทธ ๋‚ด์šฉ์ด ๋”ฐ๋ผํ•˜๊ธฐ ์ˆ˜์›”ํ–ˆ์Œ! https://velog.io/@tpdlqj0514/Java-2%EA%B0%95.-Java-%EC%84%A4%EC%B9%98-%EB%B0%8F-%ED%99%98%EA%B2%BD%EB%B3%80%EC%88%98-%EC%84%A4%EC%A0%95Mac [Java] 2๊ฐ•. Java ์„ค์น˜ ๋ฐ ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •(Mac) ์ž๋ฐ”๋ฅผ ์„ค์น˜ํ•˜๊ณ  ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ด์ฃผ์ž. velog.io

TIL 2022.01.12

Spring Legacy Project ) ํ”„๋กœ์ ํŠธ ํ™˜๊ฒฝ ์„ค์ • ํ•ด์ฃผ๊ธฐ

์Šคํ”„๋ง ๋ ˆ๊ฑฐ์‹œ ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒˆ๋กœ ๋งŒ๋“ค๊ณ  ๋‚˜์„œ ๋ณ€๊ฒฝํ•ด์ค˜์•ผ ํ•  ์„ค์ •๋“ค์„ ์ •๋ฆฌํ•ด๋ณด๋ คํ•œ๋‹ค. ํ•˜์œ„๋‚ด์šฉ์œผ๋กœ ์„ธ ํŒŒ์ผ์„ ์ˆ˜์ •ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. pom.xml 1. java version - source - target 2. org.springframework-version 3. dependency > servlet 4. dependency > jsp web.xml ํƒœ๊ทธ ๋‚ด ์†์„ฑ๊ฐ’ ์ˆ˜์ • home.jsp ์ž์„ธํžˆ ์•Œ์•„๋ณด์ž~! pom.xml 1) java version 2)org.springframework-version ์Šคํ”„๋ง ๋ ˆ๊ฑฐ์‹œ ํ”„๋กœ์ ํŠธ๋ฅผ ์ฒ˜์Œ ์ƒ์„ฑํ• ๋•Œ ๊ฒฝ๋กœ๋ฅผ com.asd.test / ์ด๋ฆ„์„ springTest ๋ผ๊ณ  ์„ค์ •ํ•ด๋‘๋ฉด, ์ฒซ๋ฒˆ์งธ ๋ฐ•์Šค ์ € ๋ถ€๋ถ„์— ๋“ค์–ด๊ฐ„๋‹ค. ๋‘๋ฒˆ์งธ ๋นจ๊ฐ„๋ฐ•์Šค ํ˜„์žฌ ์ž๋ฐ”11๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๊ธฐ๋•Œ๋ฌธ์—, ํ•ด..

TIL 2022.01.12

Oracle /SQL /๊ธฐ๋ณธ๊ฐ’ DEFAULT ์ œ๊ฑฐํ•˜๊ธฐ

๋””ํดํŠธ ์„ค์ •, ๋ณ€๊ฒฝ ALTER TABLE ํ…Œ์ด๋ธ”๋ช… MODIFY ์ปฌ๋Ÿผ๋ช… ์ปฌ๋Ÿผ๋ช…์˜_๋ฐ์ดํ„ฐํƒ€์ž…(ํฌ๊ธฐ) DEFAULT ๊ฐ’; ALTER TABLE ํ…Œ์ด๋ธ”๋ช… MODIFY ์ปฌ๋Ÿผ๋ช… ์ปฌ๋Ÿผ๋ช…์˜_๋ฐ์ดํ„ฐํƒ€์ž… DEFAULT SYSDATE; ๋””ํดํŠธ ์‚ญ์ œ ALTER TABLE ํ…Œ์ด๋ธ”๋ช… MODIFY ์ปฌ๋Ÿผ๋ช… DEFAULT NULL; ---------- ์ดˆ๊ธฐ์— ๊ธฐ๋ณธ๊ฐ’์„ ์ง€์ •ํ•ด์ฃผ์ง€ ์•Š์œผ๋ฉด ๊ธฐ๋ณธ๊ฐ’์œผ๋กœ null์ด ๋“ค์–ด๊ฐ€๊ธฐ ๋•Œ๋ฌธ์—, ๋ฏธ๋ฆฌ ์ง€์ •ํ•ด๋‘” ๊ธฐ๋ณธ๊ฐ’์„ ์—†์• ๊ธฐ ์œ„ํ•ด์„œ ๋‹ค์‹œ ๋„๋กœ ๊ธฐ๋ณธ๊ฐ’์„ ์ค€๋‹ค.

TIL 2022.01.06

Bootstrap ์Šคํƒ€์ผ ์ฝ”๋“œ ๋ณ€๊ฒฝํ•˜๊ธฐ

[ w3school ์—์„œ ์ œ๊ณตํ•˜๋Š” bootstrap4๋ฅผ ์ด์šฉํ•ด์„œ ์Šคํƒ€์ผ ์‰ฝ๊ฒŒ ์ ์šฉํ•˜๊ธฐ ] https://www.w3schools.com/bootstrap/bootstrap_ver.asp Bootstrap 3, 4 or 5 W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com ์šฐ์„ , ์œ„ ์‚ฌ์ดํŠธ์˜ ์—ฌ๋Ÿฌ ์Šคํƒ€์ผ์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ head ๋ถ€๋ถ„์— ์•„๋ž˜์˜ ์ฝ”๋“œ๋ฅผ ๋ณต๋ถ™ํ•ด์ค€๋‹ค. ๋ถ€ํŠธ์ŠคํŠธ๋žฉ์„..

TIL 2022.01.02

servlet ์—์„œ alert ๋„์šฐ๊ธฐ

[ ๋กœ๊ทธ์ธ ์‹คํŒจ ์‹œ, ์•Œ๋ฆผ์ฐฝ์„ ํ†ตํ•ด ๋ฉ”์„ธ์ง€๋ฅผ ์ „๋‹ฌํ•ด์ฃผ๊ณ  ๋‹ค์‹œ ์ด์ „ ํŽ˜์ด์ง€๋กœ ๋Œ์•„๊ฐ€๋Š” ๊ธฐ๋Šฅ ๊ตฌํ˜„ํ•˜๊ธฐ ] ํ™”๋ฉด์—์„œ ๋ณด์—ฌ์ง€๋Š” ์ฐฝ์ด๋‹ˆ๊นŒ ๋‹จ์ˆœํžˆ jsp์—์„œ ์ฒ˜๋ฆฌํ•ด์ฃผ๋ฉด ๋œ๋‹ค๊ณ  ์ƒ๊ฐ. db์— ์กด์žฌํ•˜์ง€ ์•Š์•„์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์—†์„ ๊ฒฝ์šฐ๋ฅผ if๋ฌธ์„ ํ†ตํ•ด ๊ฐ์‹ธ์ฃผ๊ณ  ์•Œ๋ฆผ์ฐฝ์„ ์ถœ๋ ฅํ–ˆ๋‹ค. ๋‹ค๋งŒ ์ฒ˜์Œ ๋กœ๊ทธ์ธํŽ˜์ด์ง€์— ์ ‘๊ทผํ–ˆ์„ ๋•Œ๋„ ๊ฐ’์ด ์—†๊ธฐ๋•Œ๋ฌธ์—, ๊ทธ๋•Œ๋„ ์•Œ๋ฆผ์ฐฝ์ด ๋œจ๋Š” ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด๋‹ค. //jsp ์— ์ž‘์„ฑํ–ˆ๋˜ ์ฝ”๋“œ (์‹คํŒจ) ๋กœ๊ทธ์ธ์„ ์‹œ๋„ํ•œ ํ›„์—๋งŒ ์•Œ๋ฆผ์ฐฝ์„ ๋ณด์—ฌ์ฃผ๊ธฐ ์œ„ํ•ด ์„œ๋ธ”๋ฆฟ ๋‚ด๋ถ€ else ์—์„œ ์ฒ˜๋ฆฌํ•ด์ฃผ๊ธฐ๋กœ ํ–ˆ๋‹ค. writer.close(); ๋ฅผ ํ•˜๋ฉด sendRedirect๋ฅผ ํ•  ์ˆ˜ ์—†๊ธฐ ๋•Œ๋ฌธ์—, ์•Œ๋ฆผ๋ฉ”์„ธ์ง€๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ  'ํ™•์ธ'๋ˆ„๋ฅด๋ฉด ์ด๋™ํ•  ๊ฒฝ๋กœ๋ฅผ location.href=""; ์•ˆ์— ์ ์–ด์ค€๋‹ค. //servlet resp.setC..

TIL 2022.01.02