Java/Spring
[Spring] 프로젝트 import 404 오류 해결 모음
펜네임
2019. 11. 15. 21:34
1. 서버-프로젝트 간 Path 연결 문제
404오류가 뜬 후 서버를 Clean해줄 때 가끔 Context root가 맞지 않는다고 뜰 때가 있다.
이 때 쓰는 방법.
1) 서버 더블클릭 > 아래 탭에서 Modules > 해당 프로젝트 선택 > Edit > Path를 / 로 바꿈 > OK
2) 프로젝트 우클릭 > Properties > Web Project Settings > Context root를 / 로 변경 > Apply and Close
2. 서버타임존(ServerTimezone) 문제
unrecognized or represents more than one time zone. You must configure either the server or JDBC driver...
이클립스 콘솔창에 위와 같은
spring/root-context.xml의 property 중 jdbcUrl을 바꿔주자.
<property name="jdbcUrl"
value="jdbc:mysql://127.0.0.1:3306/lightranet?serverTimezone=UTC"></property>
?serverTimezone=UTC 이 맞을 수도 있고
?serverTimezone=Asia/Seoul 이 맞을 수도 있음.
3. DB Connector 문제
1) 프로젝트 우클릭 > Properties > Java Build Path > DB 커넥터 jar 파일 다시 넣기
2) Deployment Assembly > 기존의 DB 커넥터 삭제 > Add... > Java Build Path Entries > 위에서 넣은 DB 커넥터 jar파일 넣기