web.xml
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup> // 새로 추가
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<bean id="/notice/list" class="com.newlecture.web.controller.notice.ListController"/>
public class ListController implements Controller{
@Override
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
// TODO Auto-generated method stub
ModelAndView mv = new ModelAndView("notice/list");
return mv;
}
}
프로젝트 빌드패스에서 jre로 설정해서 해결
entity에서 매개변수 값이 있을 때의 생성자만 생성했기 때문에 발생했던 오류
public NewlecExam(){}로 기본생성자 생성 후 정상 실행됨
C:\Program Files\Apache Software Foundation\apache-tomcat-9.0.56\lib
에 복붙<property name="mapperLocations" value="classpath:com/domain/sql/mapper/*.xml"/>
<property name="mapperLocations" value="classpath*:com/domain/sql/mapper/*.xml"/>
<!-- classpath뒤에 *을 붙여줌 -->