Java34 [Swagger UI] Spring Boot์์ ์ฐ๋(ํ ์คํธ ์์) Spring Boot์์ Swagger UI๋ง ๋์ฐ๋ ์์ฃผ ๊ฐ๋จํ ๋์์์ด๋ค.์์์์๋ db์ฐ๊ฒฐ์ด ํ์์์ด์ ์ฐ๊ฒฐ์ ํ์ง ์์๋ค.(์ค์ ํ์ผ์ ์๋ ์ค์ ์ถ๊ฐ) application.yml spring: autoconfigure: #db์ฐ๊ฒฐ x exclude: - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration์์กด์ฑ ์ถ๊ฐdependencies {//...์๋ต// swagger ์ถ๊ฐimplementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'}๊ฐ์ธ ์คํฐ๋ ๊ธฐ๋ก์ ๋ฉ๋ชจํ๋ ๊ณต๊ฐ์ด๋ผ ํ๋ฆฐ์ ์ด ์์ ์ ์์ต๋๋ค.ํ๋ฆฐ ์ ์์ ๊ฒฝ์ฐ ๋๊ธ ๋ถํ๋๋ฆฝ๋๋ค. IT/Live Coding 2025. 1. 31. [java] ์ง์ ๊ตฌํํ List ์ถ์ํ (feat. ์์กด๊ด๊ณ ์ฃผ์ ) ๋ชฉ์ฐจ๋ณต์กํ ๋ก์ง์ ์ํํ๋ ๋ฐฐ์น ํ๋ก๊ทธ๋จ์ด ์๋ค๊ณ ๊ฐ์ ํ๋ค.๋ก์ง์ ๋งค๊ฐ๋ณ์๋ก ๋์ด์จ ์ธ์๋งํผ ๋ฃจํ๋ฅผ ๋๋ฉด์ list์ ์๋ถ๋ถ์ ๋ฐ์ดํฐ๋ฅผ ๋ฃ๋ ๋ก์ง์ด๋ค.(์๋ถ๋ถ์ธ๊ฒ ์ค์)๋ฐฐ์นํ๋ก๊ทธ๋จ ์ฝ๋๋ฅผ ์ ์ ๊ฐ๋ฐ์๋ค์ด ๋ฆฌํฉํ ๋ง ํ๋ค๋ ์คํ ๋ฆฌ๋ค.Ver 1: ArrayList ์ฌ์ฉ์ ์ฑ๋ฅ ๋ฌธ์ package collection.test;import collection.list.MyArrayList;public class BatchProcessorV1 { // MyArrayList์ ์ง์ ์์กด(bad) private final MyArrayList list = new MyArrayList(); //์์ฒญ ๋ณต์กํ ๋ก์ง์ด๋ผ๊ณ ๊ฐ์ public void logic(int size) { long st.. IT/development 2025. 1. 5. [java] ์ง์ ๊ตฌํํ๋ ์ฐ๊ฒฐ๋ฆฌ์คํธ > ์ถ๊ฐ, ์ญ์ ๊ธฐ๋ฅ (feat. ์๋ฃ๊ตฌ์กฐ) ๋ชฉ์ฐจ์ฐ๊ฒฐ๋ฆฌ์คํธ์ ์ถ๊ฐ, ์ญ์ ์๋ฆฌ๋ ์ ๋ง ๊ฐ๋จํ๋ฐ ๊ทธ ์ถ์์ ์ธ ๊ฐ๋ ์ ๋จธ๋ฆฟ์์ผ๋ก ๊ทธ๋ฆฌ๋๊ฒ ๋๋ฌด ์ค๋ ๊ฑธ๋ ธ๋ค.source codepackage collection.link;public class MyLinkedListV2 { private Node first; private int size = 0; //๋ง์ง๋ง ์ธ๋ฑ์ค์ ๊ฐ์ ์ถ๊ฐ public void add(Object e) { Node newNode = new Node(e); if(first == null) { first = newNode; } else { getLastNode().next = newNode; } size++; .. IT/development 2025. 1. 5. [java] LinkedList(์ฐ๊ฒฐ ๋ฆฌ์คํธ) ๋ด ๋ฐฉ์๋๋ก ์ดํด (feat. ์๋ฃ๊ตฌ์กฐ) ๋ชฉ์ฐจ์นดํ ๊ณ ๋ฆฌ๋ฅผ ๊ณ ๋ฏผํ๋ค๊ฐ ์ค์ค๋ก ์์ง ์๋ฃ๊ตฌ์กฐ์ ๋ํด ์ ์ ๋ฆฌ๊ฐ ์๋ ์ํ๋ผ์ ๊ทธ๋ฅ java๋ก ๋ถ๋ฅํ๋ค.source code package collection.link;public class NodeMain1 { public static void main(String[] args) { //๋ ธ๋ ์์ฑํ๊ณ ์ฐ๊ฒฐํ๊ธฐ: A -> B -> C Node first = new Node("A"); //1๋ฒ ์งธ ๋ ธ๋์ ์ฐธ์กฐ๊ฐ first.next = new Node("B"); //1๋ฒ ์งธ ๋ ธ๋์ nextํ๋์ 2๋ฒ ์งธ ๋ ธ๋์ ์ฐธ์กฐ๊ฐ ์ ์ฅ first.next.next = new Node("C"); //2๋ฒ ์งธ ๋ ธ๋์ nextํ๋์ 3๋ฒ ์งธ ๋ ธ๋์ ์ฐธ.. IT/development 2025. 1. 4. [java] generic review (ํ ์คํธ ์์) ๊น์ํ์ ์ค์ ์๋ฐ ์ค๊ธ2ํธ์ ์ ๋ค๋ฆญ ํธ์ ํ์ตํ๊ณ ๋ณต๊ธฐ์ฐจ์์์ ๋์์ ์ดฌ์์ ํ๋ค.์ญ์ ํ์ตํ ๊ฑธ ๋ณต๊ธฐํ ๋ ์ง์ ๋ด๊ฒ์ด ๋๋ค. IT/Live Coding 2024. 12. 27. [java] ๋คํ์ฑ์ ์ด์ฉํ ์ค๋ณต ์ฝ๋ ๋ถ๋ฆฌ (feat. ์ต๋ช ํด๋์ค) ๋ชฉ์ฐจ [java] ๋คํ์ฑ์ ์ด์ฉํ ์ค๋ณต ์ฝ๋ ๋ถ๋ฆฌ (feat. ์ ์ ์ค์ฒฉ ํด๋์ค)๋ชฉ์ฐจEx2Mainpackage nested.anonymous.ex;public class Ex2Main { public static void helloThor() { System.out.println("ํ๋ก๊ทธ๋จ ์์"); //์ฝ๋ ์กฐ๊ฐ ์์ for (int i = 0; i helloThor(), helloLoki()์ ์ฝ๋ ์กฐ๊ฐ ์์ ~ ์ข ๋ฃ๋ถ๋ถ์ ์ค๋ณตyaga.tistory.com์ ํฌ์คํ ์์ ์ด์ด์ง๋ ๋ด์ฉ์ต๋ช ํด๋์ค ํ์ฉ1package nested.anonymous.ex;public class Ex1RefMainV2 { public static void hello(Process process) { Syst.. IT/development 2024. 12. 25. [java] ๋คํ์ฑ์ ์ด์ฉํ ์ค๋ณต ์ฝ๋ ๋ถ๋ฆฌ (feat. ์ ์ ์ค์ฒฉ ํด๋์ค) ๋ชฉ์ฐจEx2Mainpackage nested.anonymous.ex;public class Ex2Main { public static void helloThor() { System.out.println("ํ๋ก๊ทธ๋จ ์์"); //์ฝ๋ ์กฐ๊ฐ ์์ for (int i = 0; i helloThor(), helloLoki()์ ์ฝ๋ ์กฐ๊ฐ ์์ ~ ์ข ๋ฃ๋ถ๋ถ์ ์ค๋ณต์ฝ๋๋ค.๋ฆฌํฉํ ๋ง ๐Godpackage nested.anonymous.ex;public interface God { void god();}Ex2RefMainV1package nested.anonymous.ex;public class Ex2RefMainV1 { public static void hello(.. IT/development 2024. 12. 25. [java] extends (feat. simple) ๋ชฉ์ฐจ๋ถ๋ชจ ํด๋์คpackage extends1.ex2;public class Parent { public void income() { System.out.println("์์ธ๋ฅผ 10,000,000์ ๋ฐ์ต๋๋ค."); }}์์ ํด๋์คpackage extends1.ex2;public class Child1 extends Parent { public void play() { System.out.println("๋์~~~~~~"); }}Mainpackage extends1.ex2;public class ChildMain { public static void main(String[] args) { Child1 child1 = new Child1(); .. IT/development 2024. 10. 23. [java] Encapsulation(feat. simple example) ์บก์ํ ์ฌ์ด ์์ package access;public class Car { private int speed; public Car() { speed = 0; } public Car(int speed) { this.speed = speed; } public void applyBrakes () { if(isStopped()) { System.out.println("์๋์ฐจ๊ฐ ์ด๋ฏธ ์ ์ง๋ ์ํ์ ๋๋ค."); } else { speed = Math.max(0, speed -50); System.out.println("์๋๋ฅผ 50 ๊ฐ์ ์ํต๋๋ค. ํ์ฌ ์๋: " + speed .. IT/development 2024. 9. 29. [DevOps] CentOS7 ์ค์น๋ถํฐ jdk, mysql, tomcat ์ฐ๋๊น์ง ๊ณผ์ CentOS7 ์ค์น๋ถํฐ jdk, mysql, tomcat ์ค์น ๋ฐ ๊ฐ๋จํ ์ฐ๋๊ณผ์ ์ ๊ฐ๋ตํ ํฌ์คํ ํ๋ค.CentOS ๋ฏธ๋ฌ ์ฌ์ดํธ์์ isovํ์ผ ๋ค์ด๋ก๋ํ๋ค.(์ฌ๊ธฐ์ GUIํ๊ฒฝ์ผ๋ก ์ค์นํ๊ธฐ ์ํด DVD ์ ํ)CentOS7 ์ค์น๋ฆฌ๋ ์ค ๋ถํ ๋์คํฌ๋ก ๋ง๋ค์ด์ ๋ถํ (๋ถํ ์ฐ์ ์์ USB Driver๋ก ๋ณ๊ฒฝ)์ฌ๋ถํ ๋๋ฅธ๋ค.root๊ณ์ ์ผ๋ก ๋ก๊ทธ์ธํ๋ค.yum update๋ฅผ ํด์ ์ต์ ์ผ๋ก ์ ๋ฐ์ดํธํ๋ค.wget์ผ๋ก ๋ค์ด๋ฐ๊ธฐ ์ํด wget์ ์ค์นํ๋ค.jdk ์ธํ jdk๋ฅผ ๋ค์ด๋ฐ๋๋ค.(๋ ์ ์์ ๋ถํ๋ ์์ํฌ 4.2.0 ๋ฐฐํฌ๋ฅผ ์ํด์ 17๋ก ์ค์นํ๋ค.)wget https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.tar.gztar xvf ์์ถํ์ผ๋ช ์ผ๋ก ์์ถ์.. IT/DevOps 2024. 4. 25. ์ด์ 1 2 3 4 ๋ค์