목록전체 글 (93)
wintertreey 님의 블로그
수업을 들으며 점점 요구사항을 전체 그림으로 봐야할 필요성을 느끼게 되었다. (중간 플젝때 작업을 하면서, 비루한 나의 밑그림에 승질이 뻗쳤던 기억이..) 암튼. 요즘은 수업마다 하는 아주작은 단위에서조차도 다이어그램을 그려보는것이 어떨까하는생각. 막상 그리려고 하니 어떻게 했지? 싶어 화살표 모양등 다시금 정리하고 넘어가고자한다. https://blog.naver.com/sweety_dnwjd/223417979649?trackingCode=blog_bloghome_searchlist 이건 전에 간단히 기입했던 staruml을 이용한 연습기록. UML 다이어그램은 크게 구조, 행위 두가지로 나뉜다. - 구조 : class, obejct, package, component, depolyment - 행위 :..
MyBatis란?MyBatis는 자바 개발자들이 데이터베이스를 쉽게 다룰 수 있도록 도와주는오픈 소스 ORM(Object-Relational Mapping) 프레임워크이다. MyBatis의 주요 장점유연성: SQL 쿼리를 직접 작성할 수 있으므로 매우 유연하다. 또한, MyBatis는 동적 쿼리를 작성할 수 있다.간결성: MyBatis는 SQL 쿼리와 프로그래밍 언어 코드를 분리하기 때문에 코드가 간결해져 유지보수에 용이성능: MyBatis는 캐시 기능을 제공하여 데이터베이스 연산 속도를 높일 수 있다.다양한 데이터베이스 지원: MyBatis는 다양한 데이터베이스에 대한 지원을 제공한다. Configuration.xml m..
이번에는 Constructor Injection, Setter Injection 모두 적용시켜보자. Sum up! 기본 작업pom.xml - maven 작업. dependencies 넣어주기 분류작업을 위해 package model, controller, other를 만들어주었다. Model 부터 시작인터페이스 & 클라스 생성하기. MyInfoInter.javapackage pack.model;public interface MyInfoInter { String myData();} MyInfo.javapackage pack.model;public class MyInfo implements MyInfoInter { @Override public String myData() { return "취미는 ..
우리가 Spring을 사용하는 수 많은 이유중에 대표적인 장점을 꼽으라면 의존성 주입 컨테이너에 관한 내용을 빼놓을 수 없다. 스프링은 자바 빈을 찾아서 ApplicationContext라고 하는 의존성 주입 컨테이너 오브젝트에 등록을 한다. 그리고 애플리케이션이 돌다가 어떤 오브젝트가 필요하다면 의존하는 오브젝트를 찾아서 연결해준다. 그렇다면 스프링은 어떻게 자바 빈을 찾아가지고 의존성 주입 컨테이너에 등록하는걸까?? @Component 어노테이션으로 이 클래스를 자바 빈으로 등록하라고 알려줄 수 있다. @Component@Component 어노테이션을 붙이면 이 클래스를 자바 빈으로 등록시키라고 알려줄 수 있다. 해당 어노테이션이 명시되어 있으면 Spring이 자동으로 클래스의 인스턴스를 생성해준다...
앞서 constructor injection에 대해서 실습해보았다. 이번엔 setter injection. 생성자의 경우 객체생성을 1번만 할 수있다.그에 반해 setter의 경우 생성자보다 더 유연하다는 장점이 있다. 연습pom.xmlmaven 프로젝트이기에 dependency 부분 추가해서 넣어준다. ShowData.javapackage pack;public class ShowData { public String processNickName() { return "홍길동"; } public String processHobby() { return "프로그래밍 만들기"; }} MyProcess.javapackage pack;public class MyProcess { //DI 중 setter i..
참고하기https://cafe.daum.net/flowlife/HqLk/60 Daum 카페 cafe.daum.net ++ xml 파일 에러 환경셋팅시 configuration.xml에 에러 발생.preference에서 xml(web)에서 첫번째 체크박스 선택 요. 주의!!!DataMapper.xml작업시 resultType pack.DataDto로 변경요. (이유: 내가 만든 팩이 DataDto 이기에)이 둘이 같아야 한다. ++ 궁금한점!! module 체크박스는 왜 빈칸으로 두어야하는가?? 찾아보니 보안상의 문제부분이나 개발환경시 번거로울수 있기에 체크해제하라고 한것. 동료 HS님의 참고하신 설명글을 추가한다. 모듈 선택 시 module-info.java 파일 생성: 모듈 이름, 의존 모듈,..
다형성(Polymorphism)은 객체지향 프로그래밍의 중요한 개념 중 하나로, 같은 코드가 여러 가지 형태로 동작할 수 있는 특성. 이는 코드의 재사용성과 유연성을 높여주는 중요한 원리이다. 다형성의 종류와 설명메서드 오버라이딩 (Method Overriding):서브클래스(자식 클래스)가 슈퍼클래스(부모 클래스)의 메서드를 재정의하여 사용하는 것을 말한다. 이 경우에는 서브클래스에서 같은 이름의 메서드를 정의하면 슈퍼클래스의 메서드는 숨겨지고 서브클래스에서 정의한 메서드가 호출된다.메서드 오버로딩 (Method Overloading):같은 이름의 메서드를 매개변수의 타입이나 개수를 다르게 하여 여러 개 정의하는 것. 컴파일러가 메서드 호출 시 전달되는 인자에 따라 적절한 메서드를 선택.다형적 변수 (..
이 개념들을 완전히 지금 다 이해할수는 없을 것이다. 간단히 의미정도만 확인하고 넘어가자. 스프링 vs 스프링 부트Spring은 스프링 프레임워크의 핵심 모듈을 모아서 만든 프레임워크 Spring에서는 개발자가 직접 설정 파일을 작성하여 스프링 컨테이너를 구성하고, 필요한 빈 객체를 등록하고, 빈 객체 간의 의존성을 설정해야 한다. Spring은 특정한 구성을 위해 추가적인 라이브러리와 설정이 필요.반면, Spring Boot는 스프링 프레임워크를 보다 쉽게 사용할 수 있도록 만든 프레임워크. Spring Boot에서는 개발자가 설정 파일을 작성할 필요 없이, 프로젝트의 설정과 라이브러리 의존성을 자동으로 처리해주는 기능을 제공. 또한, Spring Boot는 실행 가능한 JAR 파일을 만들 수 있다...