新人在学习SSH过程中出现的问题

woaizhuxian232 2016-09-19 03:13:21
图片上传不上来。
第一个就是ApplicationContext中,出现错误。
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
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">
配置代码是这样的,在第一行中出现了:Referenced file contains errors (http://www.springframework.org/schema/beans). For more information, right click on the message in the Problems View and select "Show Details..."的错误
第二个问题就是在配置xml文件中,两个配置文件都出现同样的错误:The markup in the document preceding the root element must be well-formed.
具体代码如下:<?xml version="1.0" encoding="UTF-8"?>
<!DocTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

我在尝试是不是配置中出现了问题,但是昨晚弄了很久也没弄好。导致后续调试无法进行,求大神帮帮忙看看具体是什么问题
我用的是Myeclipse10,JDK版本1.6,spring为3.2.0,Struts2为2.3.30,hibernate3.6.10.
...全文
311 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
douxbear 2016-09-23
  • 打赏
  • 举报
回复
给你参考一下我的ApplicationContext <?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:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
  • 打赏
  • 举报
回复
网上搜一个头赋值上去试试
woaizhuxian232 2016-09-19
  • 打赏
  • 举报
回复
暖下帖。我还是没解决、、、、
woaizhuxian232 2016-09-19
  • 打赏
  • 举报
回复
昨天试过了,修改了也不行呢、
freekaiQaQ 2016-09-19
  • 打赏
  • 举报
回复
你把那几个 —3.0 改成2.5试一下。

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧