勿谓今日不学而有来日,勿谓今年不学而有来年。
日月逝矣,岁不我延。

Mybatis的映射文件中的注释

Mybatis异常:

org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.apache.ibatis.builder.BuilderException: Error evaluating expression ''. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression:  [org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
    ":" ...
    "not" ...
    "+" ...
    "-" ...
    "~" ...
    "!" ...
    "(" ...
    "true" ...
    "false" ...
    "null" ...
    "#this" ...
    "#root" ...
    "#" ...
    "[" ...
    "{" ...
    "@" ...
    "new" ...
    <IDENT> ...
    <DYNAMIC_SUBSCRIPT> ...
    "\'" ...
    "`" ...
    "\"" ...
    <INT_LITERAL> ...
    <FLT_LITERAL> ...
    ]

这个异常是因为在Mybatis的映射文件中mapper节点下的select子节点下含有注释。去掉注释即可

 

赞(1)
未经允许不得转载:喋喋不休 » Mybatis的映射文件中的注释

评论 抢沙发

评论前必须登录!

 

精品网站

有券无忧电脑壁纸精选