#. Problemhttps://www.acmicpc.net/problem/1976* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 동혁이가 목적을 달성하기 위해서는여..
#. Problemhttps://www.acmicpc.net/problem/13022* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 뭔가 조건이 복잡해보이지만..!중..
| 단위 테스트? 프로젝트를 진행하는 중간중간구현이 잘 되어가고 있는지 확인하기 위해테스트를 해주는게 중요하다. Spring에서는 개발과 테스트를 분리해서 해볼 수 있다.즉 src 영역과 test 영역이 나뉘어져 있다. 기존에는 아래와 같이 bean이 잘 등록되었는지 확인하곤 했었다..12345678910public class TestClient { public static void main(String[] args) { ApplicationContext ctx = new AnnotationConfigApplicationContext(ApplicationConfig.class); String[] beans = ctx.getBeanDefinitionNames(); for(String bean : beans..
프로젝트를 만드는 과정을 기록해두자 ! mybatis-spring Documentaion | 프로젝트 생성 프로젝트 생성 및 기본 설정 세팅은 아래 포스트를 참고해보자. [Spring] Spring@MVC 프로젝트 세팅하기 | 필요 라이브러리 설정 MVC project 로 생성하면 아래 라이브러리는 자동으로 세팅된다.- spring- spring web MyBatis 라이브러리- Mybatis- Mybatis-Spring MySQL 라이브러리- mysql spring-JDBC 라이브러리spring-jdbc 와 spring 연동을 위해 spring version 이 필요하다.- spring-jdbc /pom.xml12345678910111213141516171819202122232425 mysql mysq..
| MyBatis Setting Mybatis 세팅을 해보자 !_! 여기서는 Spring-MyBatis 연동이 아닌 순수 MyBatis만 사용할 것이다.순수 MyBatis가 아닌 mybatis-spring 세팅을 원한다면아래 글로 GoGo !![Spring-myBatis] Spring-myBatis 프로젝트를 만들어보자 ! || MyBatis MyBatis는 Java Object와 SQL문 사이의 자동 Mapping 기능을 지원하는ORM(Object Relational Mapping) Framework- MyBatis는 SQL을 별도의 파일로 분리해서 관리- Object와 SQL 사이의 parameter mapping 작업을 자동으로 해줌 순수 MyBatis 세팅을 위해 다운로드와 Documentatio..
| JAVA JDBC Spring에서는 Mybatis를 주로 사용하지만,JAVA에서 JDBC를 사용할 경우 자주 헷갈리고, 가물가물할 때가 있다.. 바로 그 때를 위해!!!기본적인 내용들을 정리해보려고 한다. Database는 MySQL를 사용하였다. || JDBC 작업 순서 1. Driver Loading (Vendor API) 2. DB 연결 (Connection 생성) 3. SQL 실행 준비3-1. SQL 작성. (Insert, Update, Delete, Select) 3-2. Statement 생성 (Statement, PreparedStatement) 4. SQL 실행4-1. Insert, Update, Delete int x = stmt.execteUpdate(sql); int x = pst..
[Spring] Spring@MVC 프로젝트 세팅하기 글을 먼저 참고해보면 좋을 것 같다.!@ 아주 기초적인(?) 흐름을 이해하기 위해 기록한 글이다.** 틀린 내용이 있다면 피드백 감사히 받겠습니다..! 전체적인 구조는 아래와 같다. | Config root-context.xml 을 JAVA 코드로 옮긴 Config 파일.@Configuration : 환경 설정 파일이라는 것을 명시@ComponentScan("com.cristoval.web.model") : @Compoment어노테이션 및 streotype(@Service, @Repository, @Controller.) annotation 부여된 Class들을 자동으로 Scan하여 Bean으로 등록12345@Configuration @Componen..
Spring은 초기 설정이 정말 중요한 만큼..나중을 위해 기록을 해두자.! 묵시적 DI 방법을 바탕으로 작성했다.여기서 사용되는 annotation을 먼저 살펴보자. @Component => Class를 Bean으로 등록 @Configuration => 환경 설정 파일이라는 것을 명시 @ComponentScan("com.cristoval.web.book") => @Compoment어노테이션 및 streotype(@Service, @Repository, @Controller.) annotation 부여된 Class들을 자동으로 Scan하여 Bean으로 등록 @Autowired => 각 상황의 타입에 맞는 IoC컨테이너 안에 존재하는 Bean을 자동으로 주입 | 프로젝트 생성 > Spring Legacy ..