1.自定义JPQL语句,出现Not supported for DML operations 错误. 解决方案:在@Query注解上面加上@Modifying注解. //出现问题的代码 @Query("delete from SysDept t where t.id =:id") void delSysDept(@Param("id")String id); //修改后的代码 @Modifying @Query("delete from SysDept t…
Mysql 8 使用过程中的命令记录 注: 当前 MySQL 数据库的版本 8.0.27 修改密码 1. 使用其他用户修改root 密码 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'Root@123'…
作为一名非主修C#的程序员,在此记录下学习与工作中C#的有用内容,持续更新 对类型进行约束,class指定了类型必须是引用类型,new()指定了类型必须具有一个无参的构造函数 where T : class, new() 创建别名,实现C的typedef类似的功能 using MyInt=System.Int32;//为Int32定义别名 创建从当日00:00:00开始的时间 DateTime date=DateTime.Now; date=date.Date; //通过返回时间的日期部分来解…