500錯(cuò)誤,tomcat啟動(dòng)正常,可以訪問(wèn)8080,不可以訪問(wèn)list
使用http://localhost:8080/seckill/seckill/list
或者http://localhost:8080/Seckill/seckill/list
或者http://localhost:8080l/seckill/list
均出現(xiàn)HTTP Status500 的錯(cuò)誤? 且錯(cuò)誤信息相同?
另外我的web.xml為
<web-app?version="3.0"?xmlns="http://java.sun.com/xml/ns/javaee" ?????????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ?????????xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ??????????http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> ????<!--?配置DispatcherServlet?--> ????<servlet> ????????<servlet-name>seckill-dispatcher</servlet-name> ????????<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> ????????<!--?配置springMVC所需要加載的配置文件 ????????????????spring-dao.xml?spring-service.xml?spring-web.xml ????????????????--> ????????<init-param> ????????????<param-name>contextConfigLocation</param-name> ????????????<param-value>classpath:spring/spring-*.xml</param-value> ????????</init-param> ????</servlet> ????<servlet-mapping> ????????<servlet-name>seckill-dispatcher</servlet-name> ????????<!--?默認(rèn)匹配所有請(qǐng)求?--> ????????<url-pattern>/</url-pattern> ????</servlet-mapping> </web-app>
Spring-web.xml為
<?xml?version="1.0"?encoding="UTF-8"?> <beans?xmlns="http://www.springframework.org/schema/beans" ???????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ???????xmlns:mvc="http://www.springframework.org/schema/mvc" ???????xmlns:context="http://www.springframework.org/schema/context" ???????xsi:schemaLocation="http://www.springframework.org/schema/beans?http://www.springframework.org/schema/beans/spring-beans-3.0.xsd ????????????http://www.springframework.org/schema/context?http://www.springframework.org/schema/context/spring-context-3.0.xsd ????????????http://www.springframework.org/schema/mvc?http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> ????<!--??配置SpringMVC?--> ????<!--?1:開(kāi)啟SpringMVC注解模式?--> ????<!--?簡(jiǎn)化配置: ???????????(1):自動(dòng)注冊(cè)DefaultAnnotationHandlerMapping,AnnotationMethodHandlerAdapter ???????????(2):提供一系列功能:數(shù)據(jù)綁定,數(shù)字和日期的format,xml、json默認(rèn)的讀寫支持 ????????????--> ????<mvc:annotation-driven/> ????<!--?2:servlet-mapping?映射路徑:"/"?--> ????<!--?靜態(tài)資源默認(rèn)servlet配置 ?????????(1):加入對(duì)靜態(tài)資源的處理:js,gif,png等 ?????????(2):允許使用“/”做整體映射 ?????--> ????<mvc:default-servlet-handler/> ????<!--?3:配置jsp顯示為ViewResolver?--> ????<!--<bean?class="org.springframework.web.servlet.view.InternalResourceViewResolver">--> ????????<!--<property?name="viewClass"?value="org.springframework.web.servlet.view.JstlView"/>--> ????????<!--<property?name="prefix"?value="/WEB-INF/jsp/"/>--> ????????<!--<property?name="suffix"?value=".jsp"/>--> ????<!--</bean>--> ????<bean?id="viewResolver" ??????????class="org.springframework.web.servlet.view.UrlBasedViewResolver"> ????????<property?name="viewClass" ??????????????????value="org.springframework.web.servlet.view.JstlView"/> ????????<property ????????????????name="prefix"?value="/WEB-INF/jsp/"/> ????????<property?name="suffix" ??????????????????value=".jsp"/> ????</bean> ????<!--?掃描web相關(guān)的bean?--> ????<context:component-scan?base-package="org.seckill.web"/> </beans>
list.jsp為
<%@?page?contentType="text/html;charset=UTF-8"?language="java"?%> <%@include?file="common/tag.jsp"?%> <!DOCTYPE?html> <html> <head> ????<title>秒殺列表頁(yè)</title> ????<%@include?file="common/head.jsp"%> </head> <body> <div?class="container"> ????<div?class="panel?panel-default"> ????????<div?class="panel-heading?text-center"> ????????????<h2>秒殺列表</h2> ????????</div> ????????<div?class="panel-body"> ????????????<table?class="table?table-hover"> ????????????????<thead> ????????????????<tr> ????????????????????<th>名稱</th> ????????????????????<th>庫(kù)存</th> ????????????????????<th>開(kāi)始時(shí)間</th> ????????????????????<th>結(jié)束時(shí)間</th> ????????????????????<th>創(chuàng)建時(shí)間</th> ????????????????????<th>詳情頁(yè)</th> ????????????????</tr> ????????????????</thead> ????????????????<tbody> ????????????????<c:forEach?var="sk"?items="${list}"> ????????????????????<tr> ????????????????????????<td>${sk.name}</td> ????????????????????????<td>${sk.number}</td> ????????????????????????<td> ????????????????????????????<fmt:formatDate?value="${sk.startTime}"?pattern="yyyy-MM-dd?HH:mm:ss"/> ????????????????????????</td> ????????????????????????<td> ????????????????????????????<fmt:formatDate?value="${sk.endTime}"?pattern="yyyy-MM-dd?HH:mm:ss"/> ????????????????????????</td> ????????????????????????<td> ????????????????????????????<fmt:formatDate?value="${sk.createTime}"?pattern="yyyy-MM-dd?HH:mm:ss"/> ????????????????????????</td> ????????????????????????<td> ????????????????????????????<a?class="btn?btn-info"?href="/seckill/${sk.seckillId}/detail"?target="_blank">link</a> ????????????????????????</td> ????????????????????</tr> ????????????????</c:forEach> ????????????????</tbody> ????????????</table> ????????</div> ????</div> </div> </body> <!--?jQuery文件。務(wù)必在bootstrap.min.js?之前引入?--> <script?src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <!--?最新的?Bootstrap?核心?JavaScript?文件?--> <script?src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> </html>
請(qǐng)朋友們幫忙看看是哪里的錯(cuò)誤? 謝謝
2019-07-22
已解決? ?需要將數(shù)據(jù)庫(kù)版本 和 pom中的mybatis配置對(duì)應(yīng)設(shè)置為一樣的版本