Easypoi map method imports data, List<Map<String, String>> Date item data is empty (null) solution

Directory Preface Solution Foreword When using easypoi map to parse an excel file, if the data format of a certain column in the file is date type, then this tool cannot read it, because its source code reads a certain column in date format, and the data must be a string type, it will handle […]

Java elegant empty judgment

Initialization Optional provides three initialization methods: @SpringBootTest public class OptionalTest {<!– –> @Test public void testOptional() {<!– –> Optional.empty(); Optional.ofNullable(null); Optional.of(null); } } empty returns an empty Optional object. of will report an error when encountering null, but the purpose of using Optional is to prevent null pointers, so ofNullable is generally used more often. […]

C++ Standard Templates (STL) – Type Support (type attributes, is_literal_type, is_polymorphic, is_empty)

Type attributes A type attribute defines a compile-time template-based structure for querying or modifying the properties of a type. Attempting to specialize a template defined in the header results in undefined behavior, except that std::common_type can be specialized as described. Templates defined in the header file may be instantiated with incomplete types unless otherwise specified, […]

When the java backend returns data to the front end, attributes with empty or NULL values are removed and certain attributes are ignored.

Table of Contents 1. Usage scenarios 2. Environmental preparation 1. Introduce dependencies 2. Entity class 3. Example 1. Do not return null value (1)Method (2)Test (3)Explanation 2. Do not return some attributes (1)Method (2)Test 4. Jackson common annotations 1. @JsonProperty 2. @JsonPropertyOrder 3. @JsonInclude 4. @JsonIgnoreProperties 5. @JsonFormat 6. @JsonUnwrapped 1. Usage scenarios During the […]

springboot custom global exception, non-empty and other parameter verification exceptions

@ApiOperation(value = “New account”) @PostMapping(“/addAccount”) public Result<Object> addAccount(@Valid @RequestBody AddAccountVo vo) { usrAccountService.addAccount(vo); return Result.success(RespCode.SUCCESS); } @NotBlank(message = “mobile cannot be empty”) @ApiModelProperty(value = “Mobile phone number”) private String mobile; @ApiModelProperty(value = “email”) private String email; @ApiModelProperty(value = “Department name-splicing”) private String deptIdListName; @ApiModelProperty(value = “Start visible permission data collection”) @NotEmpty(message = “enabledList cannot be […]

Understand Seata distributed transaction TCC mode and solve empty rollback, idempotence, and hanging problems in one article

Reprint: https://mp.weixin.qq.com/s?__biz=Mzg3Mjk3OTA4OA== & amp;mid=2247484545 & amp;idx=1 & amp;sn=9fe01ef81d68f1f3b8912e44b0a588b8 & amp;chksm=cee64b7ef991c2689d 11a3f33ab07e4f50cd388ab487b05659995e2dcbcac4742292a79be6ee & amp ;cur_album_id=2973104649560178694 & amp;scene=189#wechat_redirect /** * @author qingzhou * * Through the @LocalTCC annotation, RM will register a branch transaction with TC when it is initialized. */ @LocalTCC public interface OrderService {<!– –> @TwoPhaseBusinessAction(name = “prepareSaveOrder”, commitMethod = “commit”, rollbackMethod = “rollback”, useTCCFence […]

[Python is not a python] function | pass empty statement | lambda anonymous function

I. Function 0x00 What is a function Functions in Python are widely used. In the previous chapters, we have been exposed to multiple functions, such as input(), print(), range(), len() functions, etc., These are all built-in functions of Python and can be used directly. In addition to built-in functions that can be used directly, Python […]

14-k8s-Basic storage EmptyDir, HostPath, NFS

Article directory 1. Related concepts 2. EmptyDir storage 3. HostPath storage 4. NFS storage 1. Related concepts Overview Volume is defined on the Pod, and then mounted to specific file directories by multiple containers in the Pod. Realize data sharing between different containers in the same Pod and persistent storage of data. The life cycle […]

New way to write empty judgment in Java! Get rid of if else

Hello everyone, I am Brother Yue. Awesome Plus, another tool is about to explode! At the beginning of the article, let’s talk about the NPE problem. The NPE problem is the NullPointerException that we often encounter in development. Assume that we have two classes, and their UML class diagrams are as shown below. In this […]

isEmpty and isBlank of StringUtils tool class

Table of Contents # isEmpty series #isBankSeries Maybe you don’t know both, maybe you don’t know the existence of isAnyEmpty/isNoneEmpty/isAnyBlank/isNoneBlank in addition to isEmpty/isNotEmpty/isNotBlank/isBlank. Come on, let’s explore org.apache.commons.lang3 .StringUtils;This tool class. # isEmpty Series StringUtils.isEmpty() Whether it is empty. You can see that the ” ” space will bypass this empty judgment, because it […]