2021年11月9日
摘要: org.hibernate.exception.GenericJDBCException: could not execute statement 使用hibernate JPA的save保存实体时报错,以上为报错信息,可能原因两条: 1、 数据库有字段设置为必填字段,在保存的时候 该字段为空 没有 阅读全文
posted @ 2021-11-09 11:50 剑舞红颜笑i 阅读(7263) 评论(0) 推荐(0)
  2021年9月13日
摘要: 我常用的两种: 1.注解获取 #测试读取配置文件 is_properties_message="hello world !" 通过编写controller测试获取结果 package com.example.produce.controller; import org.springframework 阅读全文
posted @ 2021-09-13 15:58 剑舞红颜笑i 阅读(142) 评论(0) 推荐(0)
  2021年8月31日
摘要: 与SpringBoot整合使用 因为RabbitMQ 其是Erlang语言开发,所以其需要下载安装Erlang和RabbitMQ(配置环境变量) 安装并运行服务(以管理员身份运行) 安装管理插件 启动、登录RabbitMQ 搭建环境 maven里引RabbitMQ的java client依赖 生产者 阅读全文
posted @ 2021-08-31 15:47 剑舞红颜笑i 阅读(53) 评论(0) 推荐(0)
  2021年8月27日
摘要: 1.E-R图,数据库建表 2.建SpringBoot项目(maven),maven中引入相关依赖 3.配置文件(.properties和yml两种)(同时配置 前者优先级高) yml形式 spring: datasource: username: root password: root url: j 阅读全文
posted @ 2021-08-27 17:26 剑舞红颜笑i 阅读(246) 评论(0) 推荐(0)
  2021年3月31日
摘要: package com.igeek.test; /** @version 1.0 @Description 1,1,2,3,5,8,13,21,34,55(斐波那契数列得地n项的值是多少) @Author scar @Date 2021/3/31 22:30 */ public class Demo 阅读全文
posted @ 2021-03-31 22:53 剑舞红颜笑i 阅读(160) 评论(0) 推荐(0)
  2021年3月2日
摘要: package experencetext; /** @version 1.0 @Description 冒泡排序(Bubble Sort) @Author scar @Date 2021/3/2 17:43 */ 原理:从尾部开始比较相邻的两个元素,如果尾部的元素比前面的大,就交换两个元素的位置。 阅读全文
posted @ 2021-03-02 18:18 剑舞红颜笑i 阅读(44) 评论(0) 推荐(0)
  2021年1月1日
摘要: 题目:给你一个未排序的整数数组,请你找出其中没有出现的最小的正整数。 示例 1: 输入: [1,2,0] 输出: 3 输入: [3,4,-1,1] 输出: 2 输入: [7,8,9,11,12] 输出: 1 public static void main(String[] args) { int [ 阅读全文
posted @ 2021-01-01 12:51 剑舞红颜笑i 阅读(783) 评论(0) 推荐(0)
  2020年12月26日
摘要: String是只读字符串,它并不是基本数据类型,而是一个对象。 从底层源码来看是一个final类型的字符数组 private final char value[]; String所引用的字符串不能被改变,一经定义,无法再增删改。 每次对String的操作都会生成新的String对象。 每次+操作 : 阅读全文
posted @ 2020-12-26 18:06 剑舞红颜笑i 阅读(57) 评论(0) 推荐(0)
摘要: public class Transaction { private final Trader trader; private final int year; private final int value; public Transaction(Trader trader, int year, i 阅读全文
posted @ 2020-12-26 17:47 剑舞红颜笑i 阅读(59) 评论(0) 推荐(0)
摘要: package experencetext; import java.util.Scanner; /** @version 1.0 @Description TODO @Author scar @Date 2020/12/26 10:29 判断是否是闰年 判断闰年条件: 1.普通年份 可以被4整除 阅读全文
posted @ 2020-12-26 11:42 剑舞红颜笑i 阅读(157) 评论(0) 推荐(0)