错误1:
HTTP Status 400 -
type Status report
message
description The request sent by the client was syntactically incorrect.
忘记在springmvc配置文件中加入InternalResourceViewResolver了.。所以controller中不能够return "show"会找不到对象,就会报出400错误。
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/view/"/>
<property name="suffix" value=".jsp"/>
HTTP Status 400 -
type Status report
message
description The request sent by the client was syntactically incorrect.
Apache Tomcat/8.5.9
忘记在springmvc配置文件中加入InternalResourceViewResolver了.。所以controller中不能够return "show"会找不到对象,就会报出400错误。
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/view/"/>
<property name="suffix" value=".jsp"/>
</bean>了
错误2:
Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'www.maven.org'
原因: 暂时不知道,,写在generator.propertis里的信息是正确的,但是不知道为什么就是连接不对。
解决方法:在spring-mybaits-config.xml中 直接写入url的值,,不使用引用的方法就就解决了。
错误3:
jsp的Form表单中加上创建日期后, 依然报此错误:
HTTP Status 400 -
type Status report
message
description The request sent by the client was syntactically incorrect.
Apache Tomcat/8.5.9
原因: Jsp中的user对象的createDate属性是Date类型的.
POJO中:
private Date createDate;所以并不匹配
结果就是把数据库中的Date类型改成Varchar,把类中的createDate类型改成String即可。jsp中:
<input type="date" name="createDate"/>
注: 参考Alfresco的数据库设计, 日期使用Varchar即可。
错误4:
如下图所示:
解决办法: 修改数据库的字段长度即可。