| 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 ..
#. Problemhttps://www.acmicpc.net/problem/20040* 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://swexpertacademy.com/main/code/userProblem/userProblemDetail.do?contestProbId=AXUqw9zKYaoDFASe&categoryId=AXUqw9zKYaoDFASe&categoryType=CODE* 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 m..
#. Problemhttps://www.acmicpc.net/problem/16398* 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 이 문제도 마찬가지로MST 기본 ..
#. Problemhttps://www.acmicpc.net/problem/4386* 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 MST 기본(?) 문제다.가중치가 ..
API 로 보통 JSON 파일을 response 할 수 있다.response 한 JSON 파일을 Parsing 해서 사용하는 법을 정리해보자! JSON Object 사용을 위해 JSON.simple import 가 필요하다.plugin으로 사용 시 "여기"를,jar 파일을 사용할 경우 "여기"를 참고해보면 좋을 것 같다. API Connection 방법은 아래 글을 참고해보자.[API] Java API Connection(HttpURLConnection, JSONObject) JSON Parsing 을 할 때,JSON 파일에 어떤 구조로 데이터가 저장되어있는지 먼저 잘 파악한 후,key 에 해당하는 value 를 객체에 알맞게 저장해주면 된다. .Java JSON Parsing .Example01 loc..