1.j2ee连接数据库
1.1
Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: The server time zone value ‘???ú±ê×??±??’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
方法一:
解决办法:将applicationContext.xml文件中的配置数据库的
<!--连接数据库的url -->
<property name="url" value="jdbc:mysql://localhost:3306/spring" />
改为
<!--连接数据库的url -->
<property name="url" value="jdbc:mysql://localhost:3306/spring?serverTimezone=CST" />
加个中国上海的时区
方法二:
右击该项目
1.2 Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user ‘r’@‘localhost’ (using password: YES)
解决办法:输入正确的数据库名及密码
1.3Eclipse创建Servers没有Apache选项
help->install new software加入网址是http://download.eclipse.org/releases/2020-06。得到一系列的插件在Web, XML, and Java EE Development中找到JST Server Adapters and JST Server Adapters Extensions。
1.4
网页404错误的问题 源服务器未能找到目标资源的表示或者是不愿公开一个已经存在的资源表示。
web.xml文件应该在WEB-INF文件夹中
1.4
报错:Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-4.3.xsd). For more information, right click on the message in the Problems View and select “Show Details…”
解决方法: