自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 linux下安装jdk1.8步骤

出现这样的提示证明已安装过,并且安装成功。会出现下面的这个文件夹类型。出现下面内容证明安装成功。

2023-04-24 14:31:09 147

原创 JAVA普通类或者工具类调用Service层或者Mapper层报空指针

一、使用示例代码如下(示例):@Componentpublic class XXXTest{ @Autowired private XXXService xxxService; @Autowired private XXXMapper xxxMapper; public XXXTest(){} public static XXXTest xxxTest; @PostConstruct public void init(){ xxxTest

2021-11-30 14:30:44 4963 4

原创 验证数据是否存在,别再使用count了

学习目标:验证数据是否存在,写法优化常见写法:目前比较常见的写法// SQL写法select count(*) from table where A = 1 and B = 2// java写法int num = xxDao.XXXCount(params);if(num > 0){ // 存在执行这里代码}else{ // 不存在执行这里代码}优化写法:优化后的写法// SQL写法select 1 from table where A = 1 AND B =

2021-10-29 16:38:32 224

原创 String类型字符串截取

一、字符串从前往后截取1.从前往后截取遇到某个字符截止String str = "我爱你_JAVA";String s = str.substring(0,str.indexOf("_"));System.out.println(s);我爱你二、字符串从后往前截取1. 从后往前截取遇到某个字符截止String str = "测试Excel_往前截取.xlsx";String substring = str.substring(str.lastIndexOf("_") + 1);Sys

2021-10-25 15:07:14 1830

原创 @RequestBody和@RequestParam 同时在方法体里面,使用postman传递参数报错

问题描述:提示:如果同时存在 @RequestBody和@RequestParam 的方法接收参数,数据传输过程中出现数据传输格式错误@PostMapping("/test")public void test(@RequestBody Test test,@RequestParam Long id) {}原因分析:解决方案@RequestBody如果实体属性不是必传参数,这个里面可以不填参数但是必须要有{},传递的json格式@RequestParam 传递参数的格式两种

2020-11-27 16:44:34 2000

原创 在使用node tools/initdb.js初始化数据库的时候报错

Previously, at most one TIMESTAMP column per table could be automatically initialized or updated to the current date and time. This restriction has been lifted. Any TIMESTAMP column definition can have any combination of DEFAULT CURRENT_TIMESTAMP and ON U

2020-04-16 16:16:02 492 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除