MySQL在执行删除、更新语句时报这种错误,是因为在MySQL处于safe-updates模式中,如果where后跟的条件不是主键id,那么就会提示这种错误。解决方式有两种。 SET SQL_SAFE_UPDATES = 0;执行该命令更改MySQL数据库模式。 在where判断条件中跟上主键id,例如:delete from firstmysqldatabase.user wh...
Error Code:1175. You are using safe update mode and you tried to update a table without a WHERE tha
Java去掉JSON数据中值为null的属性字段
@JsonInclude(JsonInclude.Include.NON_NULL) 此方法集成于Springboot2.0中,此方法的配置意在实体类与JSON互转的时候属性值为null的不参与序列化。使用时用注解的方式: 放在标记类 @JsonInclude(JsonInclude.Include.NON_NULL) public class HandlePayResponse ...
前端到后端400错误(The server cannot or will not process the request due to...)
错误信息 The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive requ...
表单中name相同的元素在后台如何获取
name相同的多个元素只需要在后台用String[] param = request.getParameterValues("param")就可以了。
在静态方法中调用Spring注入的类
@Component public class FileUtil { @Autowired FileConfig fileConfig; @Autowired private static FileConfig staticFileConfig; @PostConstruct public void init() { sta...
图片转BASE64
public static String getImageStr(File file, String fileType) throws IOException { String fileContentBase64 = null; String base64Str = "data:" + fileType + ";base64,"; Strin...
Java工具类把URL转换成二维码
<dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.1.0</version> </dependency> import java.awt.im...
Windows10下当前目录右键添加CMD快捷方式
Win10下Shift + 右键不能打开CMD,只能打开PowerShell。首先,在桌面新建一个文本文档。 Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\cmd_here] @="在此处打开命令行" "Icon"="cmd.exe" [...
PowerDesigner中,修改了某个字段的name,其code也跟着修改
选择Tools -> GeneralOptions…菜单,出现General Options对话框。 从Category中选择Dialog项。 取消右边“Name to Code mirroring”复选框。 参考:PowerDesigner中,修改了某个字段的name,其code也跟着修改
PowerDesigner中name和comment的互相转换
在【Tools】-【Execute Commands】-【Edit/Run Script】下。输入下面你要选择的语句即可,也可以保存起来,以便下次使用,后缀为.vbs。需要注意的问题是:运行语句时必须在Module模式下,如果是导出报表时执行会出现错误提示。 name转到comment注释字段 '如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失。...