随笔分类 - 后端
摘要:# 1. 问题 启动SpringBoot时,报错 目标发行版61应为54 # 2. 原因 不知道,没百度 # 3. 解决办法 降低SpringBoot或者提高SpringBoot版本即可
阅读全文
摘要:# 1. 问题 启动SpringBoot时,报错 无效的目标发行版  # 2. 原因 项目启动配置的 JD
阅读全文
摘要:问题 springboot 启动报错 Bean with name ‘xxxxService‘ has been injected into other beans 原因 依赖循环,即我现在有一个ServiceA需要调用ServiceB的方法,那么ServiceA就依赖于ServiceB,并且在Se
阅读全文
摘要:// 此处是某公司三方接口请求封装类,只需要关注返回的 HttpResponse 中的数据即可,HttpResponse中返回含有图片流 HttpResponse httpResponse = ArtemisHttpUtil.doPostStringImgArtemis(xxx); try { //
阅读全文
摘要:问题 发送post请求报错 javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpat
阅读全文
摘要:问题 SpringBoot使用@RequestBody注解,无法映射首字母大写属性 如下图定义的实体类属性,不管使用的 lombok.Data 还是自己 生成 get/set 方法都无法映射到值 原因 Spring的@RequestBody注解,进行参数映射时使用的是set方法,若有两个参数,以ja
阅读全文
摘要:官方给的示例虽说很详细,但是对于我这个第一次对接三方平台的人来说还是很懵逼的,所以只能通过不断的测试摸索最后才得到了这个签名结果,作为记录以及为后来的人做参考。 认证方式: 一:AK\SK摘要认证 public static void test034(){ try { /*请求数据信息*/ // 请
阅读全文
摘要:Spring的注解形式:@Repository 、@Service、@Controller,它们分别对应存储层Bean、业务层Bean、展示层Bean 1、@Component 是一个泛化的概念,仅仅表示一个组件 (Bean) ,可以作用在任何层次。 例如: 2、@Service 通常作用在业务层,
阅读全文
摘要:一、前言 1. 过去的做法(List 转 Map) List<User> userList = new ArrayList<>(); userList.add(new User().setId("A").setName("张三")); userList.add(new User().setId("B
阅读全文
摘要:在idea中提取变量 Ctrl + Alt + V 这个快捷键大家一定不陌生.其用法不少,主要的用法就是先创建一个对象,然后通过提取变量快捷键快速的将对象赋值给自动声明的变量,如下:先写对象的创建: new ArrayList() 然后按下 Ctrl + Alt + V ,出现: ArrayList
阅读全文
摘要:public class TestArrayList { public static void main(String[] args) { List<User> userList = new ArrayList<User>(); buildData(userList); for(User u : u
阅读全文
摘要:package com.baidu.mybatis_test_1.dao; import com.baidu.mybatis_test_1.domain.User; import org.apache.ibatis.annotations.*; import org.apache.ibatis.ma
阅读全文
摘要:问题: 执行sql查询报错 net.sf.jsqlparser.statement.select.PlainSelect.getGroupByColumnReferences()Ljava/util/List; 解决方法: 添加依赖即可解决,如果这个版本不行就换另一个版本试试,我报错后首先用的 2.
阅读全文
摘要:1、为表格添加注释 // 原型 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'表格注释内容' , @level0type=N'SCHEMA',@level0name=N'选择dbo或者guest', @level1
阅读全文
摘要:接收前端或第三方推送的Post请求数据时,通常利用request获取参数可以直接通过request.getParameter("name")的方式获取URL上或者ajax data提交上来的参数。但是body是没有名字的,无法通过参数名字这种方式获取。 两个方法: 方法一:通过@RequestBod
阅读全文