自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (2)
  • 收藏
  • 关注

原创 insert into select 踩坑

原始sql语句:INSERT INTO auth ( open_id, user_id, node_id, helmet_color, is_node_active, admin_id, is_admin_active )SELECT u.open_id, u.id AS user_id, n.id AS node_id, n.helmet_color AS helmet_color, n.is_active AS is_node_active, a.id AS admin_id, a.i

2021-02-01 18:08:57 246

原创 同样的查询语句,list返回空集合,map返回为null

mapper层;public interface CompanyMapper extends BaseMapper<Company> { @Select("select id from company where tel = #{map.tel} or name = #{map.company_name}") List<Integer> getIdByNameOrTel(@Param("map")Map<String, Object> map);

2021-01-28 16:03:59 519

原创 springboot用string方式转发和重定向到另外的controller

原始的controller,注意,只能使用@Controller注解,不能够使用@RestController注解,因为@RestController是包含了@ResponseBody的。@Controllerpublic class ForwardAndRedirectController { @GetMapping("/forward") public String forward() { System.out.println("forward........");

2021-01-22 11:15:13 1255

原创 unable to find valid certification path to requested target

java8环境,获取微信微信公众号平台的 access_token 时候,报错如下:unable to find valid certification path to requested target按照网上方式,两步解决:安装认证证书,可参考https://blog.csdn.net/frankcheng5143/article/details/52164939#comments修改 java 的 Path 环境变量原来为:%JAVA_HOME%\bin现在增加一条:%JAVA

2021-01-20 13:28:30 536

原创 Parameter index out of range (2 > number of parameters, which is 1).

mapper.xml里面如下:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.org/DTD Mapper 3.0" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mapper namespace="cn.gzhwebuser.mapper.GatewayMapper"> <select id="getGa

2021-01-18 15:58:46 133

原创 java 后端接受前端的传来的 json 或者键值对数据

后端用 @RequestParam + map 接受@PostMapping("/map")public String getNode(@RequestParam Map<String, String> map) { return "hello " + map.get("type") + " >>>>>" + map.get("id");}前端可以用键值对传参数:前端可以把参数放在body里面:后端用 @RequestParam + 参数

2021-01-13 14:14:35 3444

原创 二叉树非递归前序、中序、后序遍历

class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() { } TreeNode(int val) { this.val = val; } TreeNode(int val, TreeNode left, TreeNode right) { this.val = val; this.left = left;

2020-12-28 15:37:17 120

原创 java值传递和引用传递

public static void main(String[] args){ int x = 6; int[][] y = {{1, 2}, {1, 2}}; int[] z = {1}; change(x, y, z); System.out.println(x); for (int[] ints : y) { for (int anInt : ints) { System.out.print(anInt + " "

2020-12-16 20:56:23 53

原创 introduce to local variable总是有declare final

出来这个的时候,按下Alt+F,下次就默认不勾选Declare final了。

2020-11-30 20:45:50 643

原创 错误: 找不到或无法加载主类

项目没有任何报错,就是找不到主类,解决方式有如下两种:一:File > invalidate Cache/Restart… > Invalidate and Restart发现依旧解决不了问题,采用第二种方式;二:1、右侧点击maven窗口,点击clean2、点击install出现报错提示:原来是导包导错了…...

2020-10-27 13:46:51 247

原创 nested exception is java.sql.SQLException: ${jdbc.driverClassName}

spring和mybatis整合的时候,总是报错如下:Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: ${jdbc.driverClassName}springContext-dao.xml配置文件如下:

2020-09-23 23:06:29 1374 1

原创 nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/ObjectMapper

用SpringMVC用到了jackson-databind-2.11.0.jar相关文件,相关的jar包已经在Pom里面导入了: <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version&g

2020-09-13 21:50:58 455

原创 web.xml里面的<init-param>报错!!!

报错如下:当把 1放在下面,就不报错了原来这还有个顺序问题…

2020-09-11 11:58:22 358

原创 Idea中,使用Junit4测试,只测试一个方法,却把所有测试方法都执行了,已经解决!

只执行最后一个test_getBirthday方法,如下:但是这4个测试方法却全部都执行了。解决方法如下:在setting里面选中skip test但是在IDEA中,file–》setting只会对当前的项目起作用,也就是这个配置只会影响当前的项目。所以应该如下:选择setting for new project,之后的项目都会保留这个skip test这个配置。...

2020-09-09 23:11:40 3508 4

原创 Bean named ‘Target‘ is expected to be of type ‘com.itheima.aop.Target‘ but was actually of type ‘com

这是一个接口实现方法package com.itheima.aop;public class Target implements TargetInterface{ public void save() { System.out.println("save running....."); }}这是定义的接口package com.itheima.aop;public interface TargetInterface { public void sa

2020-09-05 17:16:51 732 3

原创 增强HttpServletRequest,修改getParameter方法,让返回的中文不乱码!

package com.itheima.controller;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRequestWrapper;import java.io.UnsupportedEncodingException;/** * 对HttpServletRequest的getParameter方法进行增强,这样子不管是GET还是POST得到的都不是乱码 */publ

2020-08-27 17:25:24 227

原创 java.sql.SQLException: Cannot create错误

用druid查询mysql里的数据 @Test public void test2() throws Exception { User user = new User("liu", "abc"); QueryRunner queryRunner = new QueryRunner(JDBCUtils.getDataSource()); User existUser = queryRunner.query("select * from userl

2020-08-27 11:38:26 507 2

原创 JavaWeb项目的jar包要放在web文件夹下面才可以调用,比如调用MySQL

2020-08-26 22:19:10 765

原创 idea中tomcat下读取资源文件的路径,资源文件放在web下面

Properties properties = new Properties(); try {// System.out.println("开始try..."); InputStream is = this.getServletContext().getResourceAsStream("/WEB-INF/db.properties"); properties.load(is);// ...

2020-08-26 10:01:27 571

原创 HTML里面action可以这样写路径

<form action="http://localhost:8080/JavaWeb01/RequestDemo02" method="post"> 姓名:<input type="text" name="username"><br> 年龄:<input type="text" name="age"><br> 爱好:<input type="checkb...

2020-08-24 16:14:27 442

webpack-zero

webpack-zero

2022-05-26

webpack的开发文档

webpack的开发文档

2022-05-25

空空如也

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

TA关注的人

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