当前位置:网站首页>jpa连接数据库password字段BLOB
jpa连接数据库password字段BLOB
2022-07-27 15:56:00 【扮作大侠】
问题描述:
数据库密码字段设置为不可见,jpa接收
mysql数据库
password BLOB,
实体类
/*
MySQL支持大量的列类型,它可以被分为3类:数字类型、日期和时间类型以及字符串(字符)类型。Mysql针对字符类型大对象存储的解决方案是Lob对象。
@Lob 注解属性将被持久化为 Blog 或 Clob 类型
Clob(Character Large Ojects)类型是长字符串类型,具体的java.sql.Clob, Character[], char[] 和 java.lang.String 将被持久化为 Clob 类型。
Blob(Binary Large Objects)类型是字节类型,具体的java.sql.Blob, Byte[], byte[] 和 serializable type 将被持久化为 Blob 类型。
@Lob 持久化为Blob或者Clob类型,根据get方法的返回值不同,自动进行Clob和Blob的转换。
因为这两种类型的数据一般占用的内存空间比较大,所以通常使用延迟加载的方式,与@Basic标记同时使用,设置加载方式为FetchType.LAZY。
原文链接:https://blog.csdn.net/weixin_42926060/article/details/85016746
*/
@Lob
@Basic(fetch = FetchType.LAZY)
@Column(name = "password",columnDefinition = "BLOB",nullable = true)
private String password;
边栏推荐
- 知物由学 | 从0到1搭建实时反外挂机制,多维度补充手游攻防力
- 查找表中多余重复记录并删除保留最小一个
- JS中的冒泡排序
- Could not obtain transaction-synchronized Session for current thread
- 帮扶、提振、担当,第六届土巴兔718全民家装节的新价值和意义
- 卷积神经网络——从R-CNN,Fast R-CNN到Faster R-CNN,Mask R-CNN
- Wechat applet cloud function batch delete multiple data error: errcode: -502005 database collection not exists
- How can we carry out NLP cross language knowledge transfer?
- Could not obtain transaction-synchronized Session for current thread
- [introduction to database system (Wang Shan)] Chapter 5 - database integrity
猜你喜欢

知物由学 | 从0到1搭建实时反外挂机制,多维度补充手游攻防力

Taishan Office Technology Lecture: word strange paragraph borders

Establishing SSL connection without server‘s identity verification is not recommended

Count the six weapons of the domestic interface cooperation platform!

知物由学 | 易盾移动端同构实践,几步改善官网交互体验

ACL 2022 | prompt based automatic depolarization: effectively reducing bias in the pre training language model

【Codeforces】 A. Computer Game

Fast parsing combined with Huatu document encryption software

如何限制root远程登入,使普通用户拥有root权限

Knowing things by learning | app slimming down, the way of safety reinforcement under the new generation AAB framework
随机推荐
Does PostgreSQL 14 support winserver2022?
[MCU] 2.3 CPU of AT89S52
Machine learning: IOU of concept understanding
灵魂一问:为什么ES比MySQL更适合复杂条件搜索?
Understand JVM language
知物由学 | 易盾移动端同构实践,几步改善官网交互体验
卷积神经网络——FPN(Feature Pyramid Networks)介绍
JDBC connection database reading foreground cannot display data
Likeshop takeout ordering system "100% open source without encryption"
The Ministry of industry and information technology re governs data security, and Netease Yidun "privacy compliance" keeps the bottom line of enterprise operation
Dbeaver connection MySQL error: the server time zone value 'Ö Ð¹ ú±ê ×¼ ʱ ¼ ä‘ is unrecognized or represents more than
JSP自定义标签(下)
微信小程序 云函数批量删除多条数据 Error: errCode: -502005 database collection not exists
XStream reports an error abstractreflectionconverter$unknownfield exception when parsing XML
ACL 2022 | prompt based automatic depolarization: effectively reducing bias in the pre training language model
卷积神经网络——SSD论文翻译
使用分布式框架WCF出现的BUG记录
Wechat applet realizes location map display and introduces map map without navigation
机器学习之评价指标(一)——回归评价指标
wallys/DR882-Qualcomm-Atheros-QCA9882-2T2R-MIMO-802.11ac-Mini-PCIe-Wi-Fi-Module-5G-high-power.