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
我希望框架能够支持Optional 的特性 新特性可以,jdk1.8都十多年了 还不支持这个特性?考虑支持吗?
例子: default optional<T>selectoneoptionalByEntityId(T entity){return optional.of(selectoneByEntityId(entity)); 例如这种写法
default optional<T>selectoneoptionalByEntityId(T entity){return optional.of(selectoneByEntityId(entity));
The text was updated successfully, but these errors were encountered:
或者可以考虑支持空安全声明 就像 Spring的方案那样, 或者直接用 org.jetbrains:annotations 理论上任何 selectOne 都应该是 org.jetbrains.annotations.Nullable
org.jetbrains.annotations.Nullable
Sorry, something went wrong.
BaseMapper不提供,你可以直接继承com.baomidou.mybatisplus.core.mapper.Mapper实现一个属于自己的mapper.
Optional<T> selectById(Serializable id);
这种定制属于你的BaseMapper你只要改动框架原来的返回值为你需要的Optional即可,其他注入的逻辑依旧可以复用Mybatis-Plus自带的.
No branches or pull requests
确认
功能改进
我希望框架能够支持Optional 的特性 新特性可以,jdk1.8都十多年了 还不支持这个特性?考虑支持吗?
参考资料
例子:
default optional<T>selectoneoptionalByEntityId(T entity){return optional.of(selectoneByEntityId(entity));
例如这种写法The text was updated successfully, but these errors were encountered: