We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
各位大佬请教一个问题通过自动代码生成的基础代码之后我写了一个简单的查询但是一直报错 org.apache.ibatis.binding.BindingException:Invalid bound statement (not found) 找不到Mapper.xml的文件
然后我把xml文件挪到了resources下顺利找到了Mapper.xml的文件,但是在新增的时候会偶尔报错Duplicate entry '' for key 'PRIMARY'主键重复
然后我把实体类的Id改为ASSIGN_UUID之后就会正常新增不会重复请问有哪位大佬能解答一下这个问题
在启动类我手动加上了 @MapperScan({"org.jeecg..mapper."})因为之前没加会找不到Mapper文件
请问这个ASSIGN_ID(3)主键重复是因为我把Mapper.xml挪到了resources的原因吗
The text was updated successfully, but these errors were encountered:
@bean public IdentifierGenerator identifierGenerator() { return new DefaultIdentifierGenerator(workerId, datacenterId); }
该ID生成策略为雪花算法,多实例不指定workId, datacenterId可能会造成重复。 在启动类添加以上代码覆盖默认ID生成实现,可使用配置随机生成,再引入上述代码实现动态ID,默认通过网卡或mac码生成
Sorry, something went wrong.
No branches or pull requests
各位大佬请教一个问题通过自动代码生成的基础代码之后我写了一个简单的查询但是一直报错
org.apache.ibatis.binding.BindingException:Invalid bound statement (not found)
找不到Mapper.xml的文件
然后我把xml文件挪到了resources下顺利找到了Mapper.xml的文件,但是在新增的时候会偶尔报错Duplicate entry '' for key 'PRIMARY'主键重复
然后我把实体类的Id改为ASSIGN_UUID之后就会正常新增不会重复请问有哪位大佬能解答一下这个问题
在启动类我手动加上了
@MapperScan({"org.jeecg..mapper."})因为之前没加会找不到Mapper文件
请问这个ASSIGN_ID(3)主键重复是因为我把Mapper.xml挪到了resources的原因吗
The text was updated successfully, but these errors were encountered: