org.hibernate.QueryException: could not instantiate class [com.ak47.cms.cms.dto.TechArticleDto] from

Table of Contents org.hibernate.QueryException: could not instantiate class [com.ak47.cms.cms.dto.TechArticleDto] from tuple Abnormal background solution in conclusion org.hibernate.QueryException: could not instantiate class [com.ak47.cms.cms.dto.TechArticleDto] from tuple When performing Hibernate-based data query, you may encounter an exception similar to ??org.hibernate.QueryException: could not instantiate class??, especially when using DTO (Data Transfer Object) from When mapping data in query results. […]

DTO parameter verification and unified exception handling

Commonly used annotation application cases in DTO files SpringBoot parameter verification Dependency package <!– After springBoot2.3 version, you need to introduce javax.validation yourself –> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> </dependency> Annotations in dto class @Data public class OrderDTO {<!– –> /** * Site selection; comma separated */ @NotBlank private String stations; /** * Feature selection; comma separated […]

Redis write failureMISCONFRedisisconfiguredtosaveRDBsnapshots, but is currently not able to persist on disk

The Java log error is as follows: redis hput exception org.springframework.dao.InvalidDataAccessApiUsageException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. ; nested exception is redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured […]

Springboot Cangqiong takeaway actual combat: 1. Environment construction (nginx startup failure solution + Entity, DTO, VO, POJO difference explanation + nio.charset.Input length = 2 error report solution)

Environment setup Front-end environment construction There is a “front-end operating environment” folder in day01 of the information. Extract the “nginx-1.20.2” folder to non-Chinese directory, and then directly click nginx in the folder .exe (it doesn’t matter if it crashes). Then enter localhost directly in the browser. If the following page appears, it means the front […]

[Recommended] Use mapstruct to convert PO VO DTO

This article is reprinted, original address: Stop using BeanUtils, isn’t this PO VO DTO conversion artifact great? Have you ever had a headache writing some original code for entity conversion, especially when there are a lot of entity fields? Introducing an open source project mapstruct that can be easily and elegantly converted to simplify your […]

dto library in copier library golang

Application scenarios: The copier library allows the use of dto in go, which is equivalent to .net automapper General usage: For more information, please go to githubjinzhu/copier: Copier for golang, copy value from struct to struct and more (github.com) package main import ( “fmt” “github.com/jinzhu/copier” ) typeUser struct { Name string Role string Age int32 […]

Coke DTO components, unified response

Cola DTO component, unified response Response content 1. Response failed 2.Single piece of data 3.Multiple pieces of data 4. Paging data Domain Model @Getter @AllArgsConstructor public enum CatType {<!– –> CHINA(“Chinese Pastoral Cat”), PERSIAN(“Persian cat”), TOMCAT(“Tom Cat”); private final String desc; } @Entity @Table(name = “tbl_cat”) @Data @Accessors(chain = true) @FieldNameConstants public class Cat {<!– […]

An IDEA plug-in helps you elegantly transform DTO, VO, BO, PO, and DO

Because the official account has changed the push rules, please click “Looking” and add “star” to get exciting technology sharing as soon as possible Click to follow the #InternetArchitect official account and get the full set of architect information here 0,2T architect learning materials dry content Previous article: Sharing of useful learning materials for 2T […]

EasyCode integrates the configuration of mybatis-plus, including DTO, Request and MVC three-layer structure

Article directory entity mapper.java mapper.xml service serviceImpl controller RespDTO CreateRequest UpdateRequest PageRequest How to use SpringCloud project Generate generic entity classes Generate mapper and service Generate Controller This article does not teach you how to install and use EasyCode, it just posts the configurations that can be used. For specific usage of EasyCode, you can […]

Recursive and non-recursive implementation of multi-level menu DTO parameter encapsulation

Recursive and non-recursive implementation of multi-level menu DTO parameter encapsulation 1. Introduction to implementation of multi-level menu encapsulation 1.1. Recursive method uses recursion to implement the encapsulation of multi-level menu DTO 1.2. Non-recursive method 2. xxx system scenario 2.1. Input parameter definition 2.2. Parameter DTO definition 2.3. Original recursive implementation 2.4. Non-recursive implementation Recently, when […]