(当接口的参数用@RequestBody修饰,同时还有另外的参数的情况) 测试接口的时候,如果项目中请求经过网关,转发到服务时,中间会将请求头数据转换成参数对象Subject。 格式如下: @PutMapping("/demo/update") public String update(@Valid ...
分类:
编程语言 时间:
2020-07-18 19:53:48
阅读次数:
76
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont ...
分类:
其他好文 时间:
2020-07-18 15:29:10
阅读次数:
71
思路染色问题,可以使用dfs,也可以使用bfs代码class Solution { boolean valid = true; int[][] graph; public boolean isBipartite(int[][] graph) { this.graph = graph; int n =... ...
分类:
其他好文 时间:
2020-07-16 21:42:04
阅读次数:
58
前端项目编译报如下错误,这两处其实是一处的报错 查看第二处报错信息中对应的getProByPath函数 可以大概知道是解析prop属性指定的路径时找不到触发的报错,由于prop是用于设置一些规则的属性 所以遇到这种报错就需要看下代码中prop指定的路径是否在rules中存在 我触发报错的原因是因为表 ...
分类:
其他好文 时间:
2020-07-13 21:33:36
阅读次数:
342
Difference between Dangling Pointer and Wild Pointer? A dangling pointer is a pointer that used to point to a valid address but now no longer does. Th ...
分类:
其他好文 时间:
2020-07-12 01:03:42
阅读次数:
90
package LeetCode_680 /** * 680. Valid Palindrome II * https://leetcode.com/problems/delete-operation-for-two-strings/description/ * * Given two words ...
分类:
其他好文 时间:
2020-07-10 09:29:42
阅读次数:
68
dfs找到解,return true, 不需要继续找了,不然回溯将恢复整个棋盘。 或者, 记录下该解,继续找下一个解(如果存在多解, 但一般不需要)。 import java.util.*; public class Main { static int[][] grid; static boolea ...
分类:
其他好文 时间:
2020-07-09 12:27:26
阅读次数:
52
模型类序列化器 1 简介 drf提供了模型类序列化器:Model Serializer。作用就是简化对应django模型类的序列化器的定义。 ModelsSerializer与常规的Serializer相同,但提供了: 基于模型类自动生成一系列字段 基于模型类自动为Serializer生成Valid ...
分类:
其他好文 时间:
2020-07-09 00:43:23
阅读次数:
77
@ControllerAdvicepublic class WebExceptionHandler { //处理Get请求中 使用@Valid 验证路径中请求实体校验失败后抛出的异常,详情继续往下看代码 @ExceptionHandler(BindException.class) @Response ...
分类:
编程语言 时间:
2020-07-08 10:26:16
阅读次数:
285
Evaluate Reverse Polish Notation Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each opera ...
分类:
其他好文 时间:
2020-07-07 13:36:17
阅读次数:
47