๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€67

[JAVA] Spring ๋ฐ์ดํ„ฐ ์ฃผ๊ณ  ๋ฐ›๊ธฐ 1. index.jsp ์ž‘์„ฑํ•˜๊ธฐ Hello World ๋งํฌ1 ๋งํฌ2 ๋งํฌ3 ๋งํฌ4 ๋งํฌ5 ๋งํฌ6 ๋งํฌ7 ๋งํฌ8 url ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ๋ฐ์ดํ„ฐ ๋ณด๋‚ด๊ธฐ 2. Tiger.java ํŒŒ์ผ ์ž‘์„ฑ package Pack01; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframewor.. 2021. 9. 16.
[JAVA] Spring Controller ์‹œ์ž‘ํ•˜๊ธฐ 1. Spring ์ดˆ๊ธฐ ์„ธํŒ… ์ฐธ๊ณ  : https://wz0z30.tistory.com/12 Java Spring ์ดˆ๊ธฐ ์„ธํŒ… (์ˆ˜๋™) 1. Maven Project ์ƒ์„ฑ ์นดํƒˆ๋กœ๊ทธ Internal ๋กœ ์„ค์ •ํ•œ ํ›„ web-app ์„ ํƒ Group id, Artifact id ์„ค์ • -> Finish C:\Users\user\eclipse-workspace\ํ”„๋กœ์ ํŠธ๋ช…\.settings ์— ์ ‘๊ทผ org.eclipse.jdt.core.prefs ํŒŒ์ผ.. wz0z30.tistory.com 2. src > main > java ํด๋” ์ƒ์„ฑ ํ›„ Package ์ƒ์„ฑ > class ํŒŒ์ผ ์ƒ์„ฑ 3. index.jsp ์ž‘์„ฑ Hello World ๋งํฌ1 ๋งํฌ2 ์€ Tiger.java์˜ @RequestMapping("t1") ์„ ์‹คํ–‰ํ•˜๋Š”.. 2021. 9. 16.
[Java] Spring ์ดˆ๊ธฐ ์„ธํŒ… (์ˆ˜๋™) 1. Maven Project ์ƒ์„ฑ ์นดํƒˆ๋กœ๊ทธ Internal ๋กœ ์„ค์ •ํ•œ ํ›„ web-app ์„ ํƒ Group id, Artifact id ์„ค์ • -> Finish C:\Users\user\eclipse-workspace\ํ”„๋กœ์ ํŠธ๋ช…\.settings ์— ์ ‘๊ทผ org.eclipse.jdt.core.prefs ํŒŒ์ผ ์ˆ˜์ • (๋ฒ„์ „ 16์œผ๋กœ ๋ณ€๊ฒฝ) eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=16 org.eclipse.jdt.core.compiler.compliance=16 org.eclipse.jdt.c.. 2021. 9. 15.
PostgreSQL ์‚ฌ์šฉํ•˜๊ธฐ 1. PostgreSQL ๋‹ค์šด๋กœ๋“œ ๋ฐ ์„ค์น˜ https://www.enterprisedb.com/downloads/postgres-postgresql-downloads Download PostgreSQL Database for Windows, Linux and MacOS & 32-bit or 64-bit Versions | EDB Download PostgreSQL packages or installers free from EDB. Get PostgreSQL for Windows, Linux and MacOS platforms. Download 32-bit or 64-bit versions. Download open-source PostgreSQL now. www.enterprisedb.com 2. Pos.. 2021. 9. 15.
[JAVA] JDBC MySQL ์—ฐ๋™ ๋ฐ CRUD ํ…Œ์ด๋ธ” ์ž‘์„ฑ 1. Java ํ”„๋กœ์ ํŠธ MySQL ์—ฐ๋™ JDBC ๋“œ๋ผ์ด๋ฒ„ ์„ค์น˜ : https://dev.mysql.com/downloads/connector/j/ MySQL :: Download Connector/J MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0, 5.7 and 5.6. Please upgrade to MySQL Connector/J 8.0. dev.mysql.com 2. JDBC ํŒŒ์ผ ์••์ถ• ํ•ด์ œ ํ›„ Java ํ”„๋กœ์ ํŠธ ์šฐํด๋ฆญ - Properties - Java Build Path - Libraries ์— mysql-connector-java-๋ฒ„์ „.jar ์ถ”๊ฐ€ 3. Java ํ”„๋กœ์ ํŠธ ์‹คํ–‰ 2. CRUD ํ”„๋กœ๊ทธ๋žจ ์ž‘์„ฑ (I.. 2021. 9. 14.
[JAVA] JSP JavaBean ์‚ฌ์šฉํ•˜๊ธฐ JavaBean ์„ ์™œ ์‚ฌ์šฉํ• ๊นŒ? JSP ํŒŒ์ผ์€ ๊ฐœ๋ฐœํ•˜๋Š” ๊ณผ์ •์—์„œ ๋””์ž์ด๋„ˆ๊ฐ€ ์ฐธ๊ณ ํ•˜๋Š” ํŒŒ์ผ์ด๊ธฐ ๋•Œ๋ฌธ์— ํ˜ผ๋ž€์„ ์ค„์ด๊ณ ์ž ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ตœ์†Œํ™”ํ•˜๊ธฐ ์œ„ํ•ด JavaBean์„ ์‚ฌ์šฉํ•ด์„œ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ฃผ๊ณ ๋ฐ›๋Š”๋‹ค. getter ์™€ setter๋ฅผ ์ •์˜ํ•˜๊ณ  ์ƒ์„ฑํ•ด๋†“์€ ํด๋ž˜์Šค์ด๋‹ค. // UserBean.java public class UserBean { private String name; private String age; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAge() { return age; } public void setAge(String age) { thi.. 2021. 9. 14.
VirtualBox-MobaXterm์„ ์ด์šฉํ•œ ์„œ๋ฒ„ ๊ตฌ์ถ• 1. VirtualBox ์ƒˆ๋กœ ๋งŒ๋“ค๊ธฐ ๋„คํŠธ์›Œํฌ ์„ค์ • : ๋„คํŠธ์›Œํฌ ์ด๋ฆ„ ํ™˜๊ฒฝ ์„ค์ •์—์„œ ๋งŒ๋“ค์–ด๋†“์€ NatNetwork(๋„คํŠธ์›Œํฌ ์ด๋ฆ„)์œผ๋กœ ๋ณ€๊ฒฝ sudo apt-get update sudo apt-get upgrade -y ip addr sudo apt-get install net-tools ip addr ํ•ด์„œ inet์— 10.0.2.4(์œ ๋™ ip)๊ฐ€ ๋ฐ”๋€Œ์—ˆ๋Š”์ง€ ํ™•์ธํ•ด๋ณด๊ณ  ๋ฐ”๋€Œ์—ˆ์œผ๋ฉด ๊ธฐ์กด์— ์„ค์ •ํ•ด๋‘” ๋„คํŠธ์›Œํฌ ํฌํŠธ ํฌ์›Œ๋”ฉ์„ ๋‹ค์‹œ ์„ค์ •ํ•ด์•ผ ํ•œ๋‹ค. 2. Putty ์—์„œ VirtualBox ์›๊ฒฉ ์ ‘์† ์ƒ์„ฑํ•œ VirtualBox ํ˜ธ์ŠคํŠธ IP์™€ ํฌํŠธ 22๋กœ ์„ค์ • ์œ ์ €๋ช…๊ณผ ๋น„๋ฐ€๋ฒˆํ˜ธ ์ž…๋ ฅ ํ›„ ์ ‘์† 3. MobaXterm ์—์„œ VirtualBox ์›๊ฒฉ ์ ‘์† MobaXterm ์— new Session ํด๋ฆญ - host IP ๋กœ.. 2021. 9. 14.
Ubuntu์™€ MySQL ์—ฐ๋™ ๋ฐ Workbench ์™ธ๋ถ€ ์ ‘์† 1. VirtualBox ์™€ MobaXterm ๊ณ„์ • ์ ‘์† sudo apt-get install mysql-client mysql-server sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf : PORT ์„ค์ •(์ถฉ๋Œ๋ฐฉ์ง€) ๋ฐ IP ์„ค์ • bind-address ๋ฅผ 0.0.0.0 ์œผ๋กœ ๋ณ€๊ฒฝ mysqlx-bind-address ์ฃผ์„ ์ฒ˜๋ฆฌ 2. MySQL ๊ณ„์ • ์ ‘์† sudo mysql -u root -p // db ๊ณ„์ •์ ‘์† mysql > USE MYSQL; > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1234'; //.. 2021. 9. 14.
5์žฅ ์ฐธ์กฐ ํƒ€์ž… 1. ๋ฐ์ดํ„ฐ ํƒ€์ž… ๊ธฐ๋ณธ ํƒ€์ž… : byte, char, short, int, long, float, double, boolean ๊ธฐ๋ณธ ํƒ€์ž…์€ ์‹ค์ œ ๊ฐ’์„ ๋ณ€์ˆ˜์— ์ €์žฅ ์ฐธ์กฐ ํƒ€์ž… : ๋ฐฐ์—ด, ํด๋ž˜์Šค, ์—ด๊ฑฐ, ์ธํ„ฐํŽ˜์ด์Šค ์ฐธ์กฐ ํƒ€์ž…์€ ๋ฉ”๋ชจ๋ฆฌ ๋ฒˆ์ง€ ๊ฐ’์„ ๋ณ€์ˆ˜์— ์ €์žฅ 2. ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ ์˜์—ญ 1. ๋ฉ”์†Œ๋“œ(Method) ์˜์—ญ ํด๋ž˜์Šค ๋ณ„๋กœ ๋Ÿฐํƒ€์ž„ ์ƒ์ˆ˜ํ’€, ํ•„๋“œ ๋ฐ์ดํ„ฐ, ๋ฉ”์†Œ๋“œ ๋ฐ์ดํ„ฐ, ๋ฉ”์†Œ๋“œ ์ฝ”๋“œ, ์ƒ์„ฑ์ž ์ฝ”๋“œ ๋“ฑ์„ ๋ถ„๋ฅ˜ํ•ด์„œ ์ €์žฅํ•œ๋‹ค. ๋ฉ”์†Œ๋“œ ์˜์—ญ์€ JVM์ด ์‹œ์ž‘ํ•  ๋•Œ ์ƒ์„ฑ๋˜๊ณ  ๋ชจ๋“  ์Šค๋ ˆ๋“œ๊ฐ€ ๊ณต์œ ํ•˜๋Š” ์˜์—ญ์ด๋‹ค. 2. ํž™(Heap) ์˜์—ญ ๊ฐ์ฒด์™€ ๋ฐฐ์—ด์ด ์ƒ์„ฑ๋˜๋Š” ์˜์—ญ์ด๋‹ค. ํž™ ์˜์—ญ์—์„œ ์ƒ์„ฑ๋˜๋Š” ๊ฐ์ฒด์™€ ๋ฐฐ์—ด์€ JVM ์Šคํƒ ์˜์—ญ์˜ ๋ณ€์ˆ˜๋‚˜ ๋‹ค๋ฅธ ๊ฐ์ฒด์˜ ํ•„๋“œ์—์„œ ์ฐธ์กฐํ•œ๋‹ค. ์ฐธ์กฐํ•˜๋Š” ๋ณ€์ˆ˜๋‚˜ ํ•„๋“œ๊ฐ€ ์—†๋Š” ๊ฐ์ฒด๋Š” ์“ฐ๋ ˆ๊ธฐ๋กœ ์ทจ๊ธ‰ํ•˜๊ณ  JVM์€.. 2021. 9. 13.