본문 바로가기

spring5

Lecture 76 - Spring(6) Model2 게시판을 Spring으로, 전자정부프레임워크 설정법, 전자정부프레임워크 모바일 * Hardcoding(jsp 페이지만 가지고 짜는거) * MVC model2 * model1 => 프로그램 제작 1. 기존 프로젝트(Dynamic Web Project) => 변환 1. 라이브러리 추가 2. 설정 2. Maven Spring Project 1. 소스 이전 작업 2. Annotation 처리(X) => 동일 기존 프로젝트를 Spring으로 변환해보자 (Model2Ex02) * 모델2는 URL 방식 이전시 설정 확인을 하는 방법 1. Build Path 2. tomcat(Targeted Runtimes) 3. 데이터베이스 실행 상태 context.xml 확인(데이터베이스 연동구문) 프로젝트명 바꾸는 법 위 루트가 서로 맞는지 확인 프로젝트를 Ex02로 복사해보자 보면 경로가 틀리다. 그래서.. 2019. 7. 5.
Lecture 75 - Spring(5) Spring MVC 게시판(2), Maven dispatcher org.springframework.web.servlet.DispatcherServlet - mapping을 따로 안했을경우 : servlet을 따로 지정하지 않으면 dispatcher-servlet.xml 파일을 디폴트로 찾음 Dynamic Web Project -> 수동으로 Spring MVC -> 다른 기술 방법(효과적 ..) Maven => Web Project MVCEx04.WebContent.WEB-INF.web.xml MVCEx index.html index.htm index.jsp default.html default.htm default.jsp encodingFilter org.springframework.web.filter.CharacterEncodingFilter .. 2019. 7. 4.
Lecture 73 - Spring(3) 스프링 게시판 JDBCEx01.spring1.BoardDAO package spring1; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; public class BoardDAO { private Connection conn = null; public BoardDAO() { // TODO Auto-generated constructor stub try { String url = "jdbc:oracle:thin:@localhost:1521:orcl"; String user = "scott"; Strin.. 2019. 7. 1.
Lecture 72 - Spring(2) 스프링 프레임워크를 이용한 게시판 토비의 스프링 : 스프링 바이블 * 필요한 부분 설계 패턴 - 미국식 합리주의(분업화) Ch.2 스프링 DI를 이용한 객체 생성 DI는 Dependency Injection의 약자로서, 우리말로는 '의존 주입'이라는 단어로 번역되어 사용된다. '의존'이라는 단어에서 알 수 있듯이 DI는 의존을 처리하는 방법에 대한 내용이다. 스프링은 기본적으로 DI를 기반으로 동작하기 때문에, 스프링을 잘 사용하려면 DI에 대한 이해가 필수적이다. 의존(Dependency) DI는 의존(Dependency)에 대한 설계 패턴이다. 기능을 실행하기 위해 다른 클래스(또는 타입)를 필요로 할 때 이를 의존(dependancy)한다고 말한다. 의존 객체를 직접 생성하는 방식의 단점 개발 생산성이 적체적으로 낮아지는 상황이 발.. 2019. 6. 28.
Lecture 71 - Spring(1) 스프링 프레임워크 설치법, 스프링 시작하기 위에 Spring Framework가 핵심이다. Spring Framework 설치법 pom.xml에서 java 버전을 1.8로, Spring을 5.0.8로 바꿔준다 4.0.0 org.springframework.samples SpringEx02 0.0.1-SNAPSHOT 1.8 UTF-8 UTF-8 5.0.8.RELEASE 4.2.1.Final 1.0.13 1.7.5 4.11 org.springframework spring-context ${spring-framework.version} org.springframework spring-tx ${spring-framework.version} org.slf4j slf4j-api ${slf4j.version} compile ch.qos.log.. 2019. 6. 27.