분류 전체보기
-
RedirectAttributes란java/스프링공부 2020. 6. 25. 12:04
컨트롤에서 RedirecAttributes라는게 있다 예시) Model model 객체는 이해가 되는데 RedirectAttributes rttr 객체를 만들고 그걸 return "redirect:/board/list" 여기서 redirect:는 무엇인지 이해가 안된다. [해석] 우선은 왜 쓰는지에서부터 생각을 해보았는데 service는 @Inject BoardService service; service.delete(boardVO.getBno()); //delete메소드를 이용해서 그 해당 글을 삭제 할텐데 scri객체는 검색어 객체 즉, getPage 현재 페이지 getPerPageNum끝페이지 getSearchType 검색타입 getKeyword 검색어 삭제 했을때 list페이지로 돌아가는데 이때 내..
-
-
Several ports (9005, 9090, 9009) required by Tomcat v8.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other proces..java/오류메모 2020. 6. 24. 20:10
톰켓이 사용해야 할 포트가 이미 사용중이라는 오류였다. 001 > netstat -a -n -o -p tcp 먼저 포트들을 다 출력하고 해당하는 포트가 사용중인지 확인한다. 나같은 경우에는 9090이 이미 돌고 있었다. 그 9090이 돌고 있는 해당 프로세스의 PID를 알아낸다 001 > taskkill /f /pid 4444 그놈을 죽이면 끝 다시 프로젝트 재시작하면 됩니다!
-
-
-
[스프링 500에러] Request processing failed; nested exception is java.lang.ClassCastException: kr.co.vo.ReplyVO cannot be cast to java.base/java.util.Listjava/Spring 게시판 만들기 2020. 6. 19. 17:36
구글링 해보니까 mybatis에서 가져오는 ReplyDAOImpl.java 매버에서 select해서 가져오는 데이터의 타입과 HomeController.java에서 서비스에서 가져와서 List에 담는 데이터 타입이 달라서 나오는 오류라고 하는데... 해결방법) 일딴 replyMapper.xml로 고고링 메퍼에도 문제가 없도 도대체 어디가 문제인지 모르겠는데. DAO에 가보면 sql쿼리결과를 가져오는 부분이 있는데 여기서 selectOne은 selectone는 one(한개)만 가져오는 애라서 list타입이 아님 고로 selectOne (x) -> selectList(o) 바꿔주면 됨!
-
[스프링 오류 500] 서블릿 [appServlet]을(를) 위한 Servlet.init() 호출이 예외를 발생시켰습니다.java/Spring 게시판 만들기 2020. 6. 19. 15:38
HomeController에서 @Inject ReplyService replyService; ReplyService를 등록 해주었는데. 바로 저 오류가 뜸 해결방법) 메시지는 memberController라는 빈을 생성하고자하는데 @Autowired할 때 빈생성에서 에러가 난다는 메시지였습니다. 처음에는 @Autowired의 문제점인 circular reference에 관한 상황이 여기서 발견되는건가 싶었지만 이유는 다름아닌 @Service 어노테이션때문 즉, 내가 ReplyServiceImpl.java 서비스에서 클래스위에 서비스 어노테이션을 선언을 안해줘서 빈에서 인식을 못한것!!!!