본문 바로가기

Spring29

target폴더 프로젝트 결과물(jar,war) 저장 장소Maven build하면 생기는 jar파일 저장 용도 2018. 9. 30.
[2-2.영속계층, 비즈니스계층]BoardService/BoardServiceImpl의 설정 스프링에서의 비즈니스 영역: 서비스(Service) 1) 인터페이스 생성요구 사항을 메서드로 정리해서 xxx.Service라는 인터페이스 정의2) 구현 객체 생성xxxServiceImpl이라는 구현 객체 생성 ※ 비즈니스 계층의 구현비즈니스 계층: 컨트롤러 DAO 트랜잭션 처리나 예외의 처리를 비즈니스 계층에서 수행하여 컨트롤러로 하여금 처리해야하는 일 분업시켜 줌 1) root-context.xml 설정를 사용하여 패키지 자동 인식 2) 인터페이스 작성BoardService.java123456789101112131415161718package org.zerock.service; import java.util.List; import org.zerock.domain.BoardVO; public interf.. 2018. 8. 23.
[오류]Could not autowire field 123456789org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.zerock.test.BoardDAOTest': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private persistence.BoardDAO org.zerock.test.BoardDAOTest.dao; nested exception is org.springframework.beans.factory.NoSuch.. 2018. 8. 19.
[오류]Injection of autowired dependencies failed 12345org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.zerock.test.BoardDAOTest': Injection of autowired dependencies failed;nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private persistence.BoardDAO org.zerock.test.BoardDAOTest.dao;nested exception is org.springframework.beans.factory.NoSuchBeanDe.. 2018. 8. 19.
[오류]경로깨짐 처음 접속하는데 CSS깨짐 현상이 나타났다.CSS는 스크립트로 내부 폴더에서 가져오는 데 깨졌다는 것은 경로 문제 a태그의 경로를 클릭해보았더니 기본 URL + 스크립트 경로였다. 그런데 나는 Context Root를 'controller' 두었기에 경로 깨짐이 발생한 것이였다.제대로 동작하려면 localhost:8080/controller/resources/bootstrap/css/bootstap.min.css으로 접속해야 했던 것 그래서 context root 를 / (루트)로 변경하니 이상 없이 잘 나왔다. 실제, 알맞은 경로로 스크립트를 접속하면 스크립트가 웹 브라우저에 나타난다. 2018. 8. 19.
[2-2.영속계층, 비즈니스계층]2.DAO생성과 XML Mapper 작업 1. XML 네임 스페이스 추가 2. SessionFactoy, SqlSessionTemplate 추가123456789101112131415161718192021 cs 3. BoardBAO 생성1234567891011121314151617181920package persistence; import java.util.List; import domain.BoardVO; public interface BoardDAO { public void create(BoardVO vo) throws Exception; public BoardVO read(Integer bno) throws Exception; public void update(BoardVO vo) throws Exception; public void del.. 2018. 8. 18.