选用 JNDI 作为连接池,又遇到个弱智问题:
Name [jdbc/mybatis] is not bound in this Context. Unable to find [jdbc].
这固定写法,文件名称什么的都没错,就是提示找不到jdbc/mybatis,可是context.xml也完全对应
Name [jdbc/mybatis] is not bound in this Context. Unable to find [jdbc].
最后发现这个问题出现在 SqlMapConfig.xml 中,因为我这个配置文件是改下的,原先用的是 pooled 所以有加载properties的语句,当时只改了下面DataSource 配置数据源部分,这个忘删了,删了就好使了。
Name [jdbc/mybatis] is not bound in this Context. Unable to find [jdbc].

相关文章: