Spring

기본적인 웹 게시물 관리

나주나주 2024. 2. 28. 16:11

scrc/main/resources 는 테스트할 때 쓸 만한 애들

 

1.요구사항 분석 해야 ==가설을 세운다

2.요구사항 따른 화면 설계

jdbcapi.DriverSpy == 결과를 표 형식

 

sqlSessionFactory == Mybatis, mapper 이용 처리

 

클래스 (자바) 파일에서 어노테이션으로 select할 시 컴파일되어버려 힘듦

그래서 xml을 이용하는 방법 경로와 파일명 똑같이 해주면

 

스프링이 똑같이 인식해줌

 

root-context.xml

<mybatis-spring:scan
		base-package="org.zerock.mapper" />
	<!-- 스프링이 마이바티스용으로 org.zerock.mapper 패키지에 있는 java파일을 관여한다. -->

	<!-- Root Context: defines shared resources visible to all other web components -->
	<!-- context:component-scan 스프링이 관리하는 코드(객체를 자동 주입 해준담) -->
	<context:component-scan
		base-package="org.zerock.domain" />

'Spring' 카테고리의 다른 글

Spring 05 - Paging  (0) 2024.03.04
Spring 04  (0) 2024.02.29
Spring 03 - Spring MVC, 파일 업로드(기본)  (0) 2024.02.28
Spring 02 - ConnPool  (1) 2024.02.27
Spring 01 - 스프링의 특징  (2) 2024.02.27