SSM框架整合的<mapper>问题

The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*|
insert*|update*|delete*|select*)+".
该怎么解决?

sql语句出错了,把mybatis中的mapper贴出来看看

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.blue.mapper.UserMapper">
    <resultMap type="User" id="userMap">
        <id property="id" column="ID"/>
        <result property="username" column="USERNAME"/>
        <result property="password" column="PASSWORD"/>
        <collection property="roleList" column="ID" 
        select="com.blue.mapper.UserRoleMapper.getRoleByUserId"/>
    </resultMap>





resultType="userMap">
SELECT
*
FROM users
where
username=#{username}
AND password=#{password}

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.blue.mapper.UserMapper">
    <resultMap type="User" id="userMap">
        <id property="id" column="ID"/>
        <result property="username" column="USERNAME"/>
        <result property="password" column="PASSWORD"/>
        <collection property="roleList" column="ID" 
        select="com.blue.mapper.UserRoleMapper.getRoleByUserId"/>
    </resultMap>





resultType="userMap">
SELECT
*
FROM users
where
username=#{username}
AND password=#{password}

同遇到这个问题了,你是怎么解决的?

我曹 ! 怎么解决啊? 同样遇到了

<update id="updateUserById" parameterType="com.lin.domain.User">
    update t_user set user_name = #{userName} where user_id = #{userId}
</update>
    主要是parameterType="com.lin.domain.User",传入数据为你自定义的类,好像是版本的原因,现在好像是用parameterType了。

不对,现在用的是parameterClass

我也遇到同样的问题,之前是好的。后来怎么也没有发现问题出自哪里。之后只好分多次将多段代码剪掉,从而排除那段代码出来问题。
直到删除了一段代码,发现不出问题了。最后发现原来是加了很多注释之后,-->-->,连续粘贴了两个这样的符号之后,就出现这个问题了。
将其中一个-->删除之后,问题解决了。
如果不知道问题出在哪里,不妨用排除法。

我的是在标签结束之后又误加了个其他的字符,然后就报错