- 博客(49)
- 资源 (1)
- 收藏
- 关注
原创 Java实现一对多匹配,需要在表二的变动日期中找到表一某人现职层/职等等于目标职务/职等的那个日期,更新到表一中
日期转换,日期比较,一对多,嵌套循环
2024-02-23 09:37:46
332
原创 HTML date类型数前后端互传,页面显示date类型
4.后端查出来数据赋值给前端时,添加th:value=“${#dates.format(incomeDetail.bizdate, ‘yyyy-MM-dd’)}”3.前端提交到后端用实体类接收时,实体类中的字段要加@DateTimeFormat(pattern = “yyyy-MM-dd”)2.前端HTML中input的date类型。1.实体类定义字段为date类型。
2024-01-11 14:04:38
674
原创 Error attempting to get column ‘remark‘ from result set
Error attempting to get column ‘remark’ from result set. Cause: java.sql.SQLDataException: Cannot convert string ‘1’ to java.sql.Timestamp value; Cannot convert string ‘1’ to java.sql.Timestamp value] with root cause先说结论:报错的原因是日期转换出了问题,数据库的日期为空值,那么就是nul
2023-08-08 14:47:53
772
原创 mybatis批量新增报错
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into user(id,username,password)values ( 20,
2020-05-25 22:23:19
388
原创 spring整合mybatis(配置文件模式)
文件目录如下所示:pom.xml,特别注意build中的内容<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.
2020-05-24 16:04:40
396
原创 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
报错如下:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.liangyu.mapper.UserMapper.queryUserList at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:235) at org.apache.ibatis.binding.Mapp
2020-05-24 15:44:35
343
原创 java.util.concurrent.RejectedExecutionException
java.util.concurrent.RejectedExecutionExceptionException in thread "main" java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@6f94fa3e rejected from java.util.concurrent.ThreadPoolExecutor@5e481248[Running, pool size = 4,
2020-05-17 16:52:42
723
原创 动态代理分析和模拟spring aop的简单实现
动态代理分析和模拟spring aop的简单实现1.目标接口package com.spring.proxy2;public interface Calculate { Integer add(Integer i,Integer j); Integer div(Integer i,Integer j);}2.目标实现package com.spring.prox...
2020-05-04 20:23:32
140
原创 动态代理分析和实现
动态代理场景:你需要通过一个女孩的家庭人员的同意才可以约女孩出去动态代理几个关键要素:1.被代理的接口类2.被代理接口的实现类3.代理类, 1)需要把代理接口引入代理类中;public class FamilyProxy implements InvocationHandler { Girl girl; public FamilyProxy(Girl girl) {...
2020-05-04 15:53:06
110
原创 spring配置AOP的过程
1.在pom.xml文件中添加jar包依赖,spring-aspects2.编写业务逻辑代码:MathCalculator.java3.编写切面类:LogAspects.java 1.@Before 2.@After 3.@AfterReturning 4.@AfterThrowing 5.@Around 6.@Pointcut需要注意:注解里面的value写上需要切...
2020-04-29 17:16:46
274
原创 springboot中@PropertySource实现配置文件加载
@PropertiesResource实现配置文件加载示例如下:epp.propertiesgaga=1010101SpringBootConfigApplicationTests.java@SpringBootTest@PropertySource(value="classpath:epp.properties")class SpringBoot02ConfigApplicati...
2020-04-07 21:59:57
296
原创 SFTP上传下载的Java代码实现
所需要的jar包有:jsch-0.1.50.jar;log4j-1.2.13.jar;SftpDomainpackage sftp;import com.jcraft.jsch.Channel;import com.jcraft.jsch.Session;/** * SFTP 实体对象 * */public class SftpDomain { private Sessi...
2020-03-26 17:07:40
650
原创 shell脚本--重启服务
#!/bin/sh快速重启某个应用demo: restart [pay|bankPay|taskman]第一个参数指定要重启的项目if [ "${1}" != "pay" ]&&[ "${1}" != "bankPay" ]&&[ "${1}" != "taskman" ]; then echo "error or null project name...
2020-03-25 15:24:56
535
原创 mybatis:There is no READABLE property named 'cusType' in class 'java.lang.String'
报错原因是在参数中找不到cusType,修改后解决问题,如下所示:
2020-03-05 17:56:55
338
原创 CentOS6.5克隆多台虚拟机需要修改的配置文件
1./etc/sysconfig/network-scripts/ifcfg-etho 修改IPADDR地址(避免重复),如下所示DEVICE=eth0TYPE=EthernetONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=192.168.174.141NETMASK=255.255.255.0DNS1=114.114.114....
2020-02-17 16:31:30
220
原创 tomcat源码运行配置
tomcat源码运行配置运行环境Jdk版本:1.8.0_211;tomcat版本:9.0.30idea:2019.3 系统:IOS首先下载tomcat源码iea新建一个空项目把tomcat源码拷贝到空项目的目录中修改tomcat源码的配置文件在tomcat目录下新建文件夹home,把conf和webapps移动到home目录下在tomcat目录下新建一个pom.xml文件...
2020-02-10 14:25:25
534
原创 使用ReentrantLock和Condition实现生产者消费者
package mashibing;/** * 生产者消费者 */import java.util.LinkedList;import java.util.concurrent.TimeUnit;import java.util.concurrent.locks.Condition;import java.util.concurrent.locks.Lock;import java...
2019-11-11 19:52:01
199
原创 wait和notifyAll实现多线程的生产者和消费者
package mashibing;/** * 生产者消费者 */import java.util.LinkedList;import java.util.concurrent.TimeUnit;public class ProducerAndConsumerTest { private final static int MAX=10; public LinkedList lis...
2019-11-11 16:51:51
103
原创 CountDownLatch的使用
场景:有2个线程,第一个线程执行到5的时候,第二个线程结束,第二个线程结束后,第一个线程继续执行package mashibing;import java.util.concurrent.CountDownLatch;import java.util.concurrent.TimeUnit;public class MyContainer2 { int count=0; Count...
2019-11-11 10:32:10
94
原创 wait和notifyAll的使用
场景:有2个线程,当第一个线程执行到5的时候,第二个线程结束,第二个线程结束后,第一个线程继续执行。package mashibing;/** * wait释放锁 * notifyAll不释放锁,所以调用完notifyAll还要再加一个wait才能让当前线程释放锁。 * sleep也不释放锁。 */import java.util.concurrent.TimeUnit;publ...
2019-11-11 10:29:51
184
原创 单向循环链表的增删改查的实现
package dataStructures.list;public class MySingleCircularNode { //当前元素 private int element; //当前结点的下一个结点 private MySingleCircularNode nextNode; //开始结点 private MySingleCircularNode beginNode=th...
2019-11-01 15:04:22
245
原创 单链表的增删改查的实现
package dataStructures.list;public class MySingleNode { private int element; private MySingleNode nextNode; public MySingleNode(int element) { this.element=element; this.nextNode=null; } ...
2019-11-01 14:35:39
144
原创 数组的增删改查操作实现
package dataStructures.list;public class MyArray { int[] array; public MyArray() { array=new int[0]; } /** * 在数组末尾插入一个元素 * @param element */ public void insertLast(int element) { //先创...
2019-11-01 09:19:20
289
原创 后缀表达式(逆波兰式)实现计算功能
package dataStructures.list;import java.util.Stack;public class ReversePolishTest { private Stack<Integer> stack; ReversePolishTest(){ stack=new Stack<Integer>(); } /** * 如果为...
2019-10-30 15:36:37
327
原创 中缀算法改后缀算法(逆波兰式)
package dataStructures.list;import java.util.HashMap;import java.util.Map;import java.util.Scanner;import java.util.Stack;public class ReversePolish { private Stack<Object> stack; priva...
2019-10-30 11:05:03
149
原创 ArrayList的自我实现(数组实现方式)
package dataStructures.list;public class AnyType {}package dataStructures.list;import java.util.Iterator;import java.util.NoSuchElementException;public class MyArrayList<AnyType>{ pr...
2019-10-29 11:11:36
138
原创 LinkedList类的自己实现和内容总结
package dataStructures.list;public class AnyType {}package dataStructures.list;import java.util.ConcurrentModificationException;import java.util.Iterator;import java.util.NoSuchElementExcept...
2019-10-29 11:05:06
189
SpringBoot+SpringMVC+Maven+Thymeleaf+HTML+mybatis+mysql基本的增删改查功能
2024-01-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人