Closed pixb closed 7 months ago
是在添加使用账户时吗?看起来是添加了重复的用户名
不是,不是重复的,我看了数据库里也只有默认的用户
修改blos用户的密码也报这个错误
我在添加重复用户名时复现了该问题,但添加不存在的用户以及修改密码时无法复现,方便提供一下数据库版本和数据库文件吗
我先自己本地调试看看能不能fix bug
异常类型: org.mybatis.spring.MyBatisSystemException
异常内容: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.IndexOutOfBoundsException: No group 2 ### The error may exist in file [/home/pix/Downloads/blossom/blossom-backend/backend/target/classes/mapper/UserMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: update base_user set password = ?,upd_time = now() where id = ? ### Cause: java.lang.IndexOutOfBoundsException: No group 2
堆栈信息:
> com.blossom.backend.base.user.UserService.updPassword(UserService.java:93)
> com.blossom.backend.base.user.UserService$$FastClassBySpringCGLIB$$2993812.invoke(<generated>:-1)
> com.blossom.backend.base.user.UserService$$EnhancerBySpringCGLIB$$4b141b5d.updPassword(<generated>:-1)
> com.blossom.backend.base.user.UserController.updatePassword(UserController.java:85)
> com.blossom.backend.base.auth.caffeine.CaffeineTokenAuthFilterProxy.doFilterInternal(CaffeineTokenAuthFilterProxy.java:104)
> com.blossom.backend.base.auth.filters.AuthFilterProxy.doFilter(AuthFilterProxy.java:53)
> com.blossom.backend.base.auth.filters.RequestWrapperFilter.doFilterInternal(RequestWrapperFilter.java:33)
> com.blossom.expand.tracker.core.adapter.spring.TrackerFilter.doFilter(TrackerFilter.java:52)
现在我能确定是mybatis的问题,mybatis再处理含有$
符号的字符串时会有问题,我调试一下看看怎么处理一下
nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: java.lang.IndexOutOfBoundsException: No group 2
The error may exist in com/blossom/backend/base/user/UserMapper.java (best guess)
The error may involve com.blossom.backend.base.user.UserMapper.insert-Inline
The error occurred while setting parameters
SQL: INSERT INTO base_user ( id, type, username, password, salt, nick_name, real_name ) VALUES ( ?, ?, ?, ?, ?, ?, ? )
Cause: java.lang.IndexOutOfBoundsException: No group 2