> 샘플코드package lyj.sample.web.api; import java.math.BigInteger;import java.util.Collection;import java.util.HashMap;import java.util.Map; import lyj.sample.model.Greeting; import org.springframework.http.HttpStatus;import org.springframework.http.MediaType;import org.springframework.http.ResponseEntity;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind..
>> SpringBoot 프로젝트 생성 및 설정 > Project Wizard로 Spring Starter Project 생성( maven 및 spring eclipse plugin 최신버전으로 update) > pom.xml4.0.0 lyjsample-springBoot0.0.1-SNAPSHOTjar sample-springBootDemo project for Spring Boot org.springframework.bootspring-boot-starter-parent1.3.5.RELEASE UTF-81.7 org.springframework.bootspring-boot-starter-weborg.springframework.bootspring-boot-starter-testtestorg.spring..
>> Spring MVC(Model-View-Controller)의 핵심 Component (Spring 2.5.6 기준) >> DispatcherServlet 에서의 웹요청 흐름 >> Web.xml에 DispatcherServlet, ApplicationContext, WebApplicationContext 설정하기 contextConfigLocation classpath*:egovframework/spring/com/context-*.xml org.springframework.web.context.ContextLoaderListener action org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/confi..
egovframework 3.5의 Enterprise business 템플릿 프로젝트로 생성한 소스 기준 >> web.xml 수정 action org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/config/egovframework/springmvc/*.xml 1 action / >> egov-com-servlet.xml 수정 json=application/json xml=application/xml >> pom.xml 수정> 아래 dependency 있다면 삭제 org.codehaus.jackson jackson-core-asl 1.9.13 org.codehaus.jackson jackson-mapper-asl..
>> 사용할 DB 및 계정 생성create tablespace EGOV_ENTR datafile 'C:\ORACLEXE\APP\ORACLE\ORADATA\XE\EGOV_ENTR.DBF' size 10M autoextend on next 5M; create user egoventr identified by egoventrdefault tablespace EGOV_ENTRquota unlimited on EGOV_ENTRtemporary tablespace TEMP; GRANT CONNECT, RESOURCE, CREATE VIEW TO egoventr; >> 테이블 및 기초데이타 생성DATABASE\all_ebt_ddl_oracle.sqlDATABASE\all_ebt_data_oracle.sql >> DB..
참고http://blog.woniper.net/272http://www.slideshare.net/sbcoba/spring-test-mvc >> pom.xml 설정junitjunit4.12 org.springframeworkspring-test${spring.maven.artifact.version} >> 공통 test context 설정 클래스 활용@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/config/egovframework/springmvc/egov-com-servlet.xml","classpath:egovframework/spring/com/*.xml"})@W..
>> 가 하는 내용 태그로 등록되는 BeanPostProcessorRequiredAnnotationBeanPostProcessor : @Required 어노테이션 처리AutowiredAnnotationBeanPostProcessor : @Autowired 어노테이션 처리CommonAnnotationBeanPostProcessor : @Resource, @PostConstruct,@PreDestroy 어노테이션 처리ConfigurationClassBeanPostProcessor : @Configuration 어노테이션 처리 >> Junit Spring 테스트를 위한 설정 pom.xml dependency추가junitjunit 4.12 org.springframeworkspring-test${spring.m..
- Total
- Today
- Yesterday