错误信息
Exception in thread "main" org.apache.ibatis.binding.BindingException: Type interface org.example.mapper.UserMapper is not known to the MapperRegistry.
报UserMapper没有注册错误的,可能namespace用的是/分隔的,应该是.
修改前
<!--namespace--> <mapper namespace="org/example/mapper/UserMapper">
修改后
<!--namespace--> <mapper namespace="org.example.mapper.UserMapper">