SpringBoot uses JsonSerializer and Aop to achieve controllable data desensitization

This is a community that may be useful to you One-to-one communication/interview brochure/resume optimization/job search questions, welcome to join the “Yudao Rapid Development Platform” Knowledge Planet. The following is some information provided by Planet: “Project Practice (Video)”: Learn from books, “practice” from past events “Internet High Frequency Interview Questions”: Studying with your resume, spring blossoms […]

[Vulnerability Recurrence] fastjson_1.2.24_unserializer_rce

Thanks to the Internet for sharing knowledge and wisdom. In a society ruled by law, please abide by relevant laws and regulations Article directory 1.1. Vulnerability description 1.2. Vulnerability level 1.3. Affected versions 1.4. Vulnerability recurrence 1. Basic environment 2. Vulnerability detection 3. Vulnerability verification 1.5. In-depth utilization 1.GetShell Description Content Vulnerability number Vulnerability name […]

django.db.utils.IntegrityError: (1048, “Column ‘spu_id’ cannot be null”) About RESTframework using serializer error…

ERROR exception 132 Internal Server Error: /meiduo_admin/goods/specs/ Traceback (most recent call last): File “D:\python_learn\meiduo_project\env\lib\site-packages\django\db\backends\utils.py”, line 64, in execute return self.cursor.execute(sql, params) File “D:\python_learn\meiduo_project\env\lib\site-packages\django\db\backends\mysql\base.py”, line 101, in execute return self.cursor.execute(query, args) File “D:\python_learn\meiduo_project\env\lib\site-packages\pymysql\cursors.py”, line 170, in execute result = self._query(query) File “D:\python_learn\meiduo_project\env\lib\site-packages\pymysql\cursors.py”, line 328, in _query conn.query(q) File “D:\python_learn\meiduo_project\env\lib\site-packages\pymysql\connections.py”, line 517, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) […]

Spring Authorization Server Optimization: Add Jackson Mixin to the Redis value serializer to solve the problem of Redis deserialization failure

Foreword In the article about front-end and back-end separation of authorization code mode, Redis is used to save user authentication information. The value serializer configured in the Redis configuration file is the default Jdk serializer. Although this can also be used, When viewed in the Redis client, the code is garbled (it seems to be). […]

python test development django-rest-framework-93. UniqueTogetherValidator joint unique verification of deserialization (ModelSerializer)…

Foreword When adding a product earlier, the product code can only be added once and can be verified with a unique field using the UniqueValidator. If a user collects a product, one user can collect multiple products, and one product can also be collected by multiple people. However, the same person can only collect the […]

Python test development django-rest-framework-91. Deserialization (ModelSerializer) ChoiceField option field verification…

Foreword When we need to verify the option field, we need to use ChoiceField to verify options There is a field in the model model that is an option field. goods_status can have two statuses, 0 means off the shelf, 1 means on sale, the default class Goods(models.Model): “””Product list””” goods_status = models.IntegerField(choices=( (0, ‘Removed’), […]

Python test development django-rest-framework-88. Deserialization (ModelSerializer) verification of incoming parameters

Foreword serializers.Serializer can serialize fields in the model model, and two methods, create and update, must be written. ModelSerializer can be regarded as an upgraded version of Serializer, which is more powerful and convenient. In fact, the ModelSerializer class inherits the Serializer class Serialization Serialization is to convert the data in the database into json […]

python test development django-rest-framework-64. serialization (serializers.Serializer)

Foreword The serializers in the REST framework are very similar to Django’s Form and ModelForm classes. We provide a Serializer class that provides you with powerful general methods to control the output of the response, and a ModelSerializer class that provides a useful shortcut for creating serializers for working with model instances and querysets. serializers.Serializer […]

Python test development django-rest-framework-65. Serialization (ModelSerializer)

Foreword serializers.Serializer can serialize fields in the model model, and two methods, create and update, must be written. ModelSerializer can be regarded as an upgraded version of Serializer, which is more powerful and convenient. In fact, the ModelSerializer class inherits the Serializer class. ModelSerializer The ModelSerializer class allows you to automatically create a Serializer class […]

ModelSerializer serializer of DRF framework

ModelSerializer is a subclass of Serializer. Serialization and deserialization are the same as Serializer. ModelSerializer is the same as a regular Serializer, but provides: Automatically generate a series of fields based on model classes Automatically generate validators for Serializer based on model classes, such as unique_together Contains default implementations of create() and update() When using […]