自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 查看修改git用户名与邮箱

查看修改git用户名与邮箱。

2022-10-03 22:12:55 940 1

原创 mybatis加入sql日志

mybatis加入日志。

2022-10-01 20:20:34 1082

原创 mysql 警告Establishing SSL connection without server‘s identity verification is not recommended

Establishing SSL connection without server's identity verification is not recommended

2022-10-01 20:16:40 871

原创 vim常用命令

vim常用命令

2022-07-10 21:33:28 270

原创 报错解决Error parsing Mapper XML

Error parsing Mapper XML这个报错本质来说是mapper.xml出现错误相同的还有 failed resolve xxx.xml等这里分析一些编写时不会明显爆红,启动报错的问题1、id冲突这里出现的冲突有resultMap<resultMap type="com.newtouch.business.module.dto.T01agentComDTO" id="t01agentComMap"><resultMap type="com.cpi.newto

2022-05-24 19:17:28 6126

原创 springBoot 配置mybatis

1、pom文件加依赖<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.2.0</version> </dependency>2、ym

2022-04-20 13:31:05 144

原创 使用 jdbc 进行增删改查

我们平时使用到的持久层都是封装了jdbc,所以不必关心jdbc的具体方法,但是也有用到的时候。首先,需要一个数据源,这个自己配置就好了,这里我只写了 jdbc 实现数据库操作方法我们首先先私有一个dataSource,一个dao层实现类private DataSource dataSource;private JdbcDao dao;这里提取一个公共方法public ResponseResult getStudent(Student stu) throws SQLException {

2022-03-03 11:17:13 3280

原创 idea 添加注释模板

新建类添加注释点击File—》settings —》 Editor —》 File and Code Templates — 》Class在空白处添加模板模板:#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end#parse("File Header.java")/** * 详细介绍类情况. * * @ClassName ${NAME} * @Author abc * @D

2022-03-02 17:53:37 1391

原创 git基本命令

1、 查看当前状态git status2、添加git add .提交全部git add xxx提交指定文件,xxx为文件名3、提交本地git commit -m “提交代码”“提交代码” 为提交的注释4、拉取pullgit pull <远程主机名> <远程分支名>例:git pull origin dev5、推送pushgit push <远程主机名> <远程分支名>例:git push origin dev

2022-02-24 18:14:45 132

原创 bug处理:error at ::0 formal unbound in pointcut

error at ::0 formal unbound in pointcut在使用aop的@before进行日志前置通知时,报了这个错误报错代码在此 @Before(value = "webLogAspect()") public void logBefore(JoinPoint joinPoint,Object ret) { ServletRequestAttributes attributes = (ServletRequestAttributes) RequestCon

2022-02-21 11:21:15 648

原创 bug处理 java.util.NoSuchElementException: No value present

java.util.NoSuchElementException: No value present这个bug感觉和空指针差不多在jpa中,返回的Optional类型如果为空的话,再对其进行操作就会报这个错原代码,第二行报错Optional<ImpConfigCategory> impConfigCategory = remoteAccessCache.findByCategoryCode(category);String categoryPath = impConfigCategor

2022-02-16 14:52:45 387

原创 使用springJpa创建数据库表

使用springJpa创建数据库表个人感觉springJpa最方便的一点就是可以动态创建数据库表1、引入依赖首先要引入jpa的依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId></dependency>2、在实体类中加入注解为了简单说

2022-02-15 17:59:22 3086

原创 使用spilt截取文件名后缀时出现的问题

使用spilt截取文件名后缀时出现的问题当时有一个需求,要截取文件的后缀名开始的代码是这样写的public static void main(String[] args) { String a = "weixin.jpg"; //原写法 String[] split = a.split("."); System.out.println(split[split.length-1]); }得到的结果是空找了好一会没发现问题出在哪

2022-02-15 17:28:49 286

原创 使用arthas阿尔萨斯进行代码耗时查看,性能调优

使用arthas进行代码耗时查看,性能调优不得不说,arthas真是个神奇,最近在进行代码性能调优,一开始是用打印时间戳的方式进行耗时查看。然后被安利了这款工具,真的强这个是arthas的官方文档https://arthas.aliyun.com/1、下载点进去下载即可https://arthas.aliyun.com/doc/download.html2、确定你的项目正在运行中比如说我启动了一个ImpCoreApplication的服务3、使用arthas进行耗时查看打开下载好的压

2021-12-14 11:25:51 6997

原创 Jmeter下载配置环境变量

Jmeter下载,配置环境变量1、下载使用jmeter需要提前安装好jdk,这里不赘述了,需要的可以看jdk安装文档,这里直接进入jmeter安装jdk安装教程:https://blog.csdn.net/weixin_46223196/article/details/108157501进入jmeter官网:http://jmeter.apache.org/我下载了5.4.1的Windows版本,对应jdk8+tgz对应Linuxzip对应Windows注意,不要下载错了这是下载好的解

2021-12-03 17:56:09 129

原创 jmeter响应乱码

jmeter响应乱码配置一个后置处理器就行线程右键 —》 添加 —》 后置处理器 —》 beanShell PostProcessor创建好进行配置脚本中输入下面这句,执行,okprev.setDataEncoding("UTF-8");

2021-12-03 17:54:54 90

原创 jmeter配置中文

1、页面操作opinion—》choose language —》 chinese如图是修改后的听说这种操作比较不稳定2、修改配置打开压缩后包—》 bin —》 jmeter.properties将39行修改为如图所示,注意将#去掉language=zh_CN

2021-12-03 17:50:13 182

原创 源码分析ArrayList

源码分析ArrayList先初始化一个ArrayList,是我创建了一个student集合List<Student> list = new ArrayList<>();1、我们进入ArrayList类看看public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializ

2021-12-01 18:11:04 276

原创 SpringBoot会用到那些注解

SpringBoot会用到那些注解在面试中遇到这个问题好多次了,今天就来总结一下,将作用简单写了一下,以后补充1、启动类//指明为springBoot启动类@SpringBootApplication//使用缓存@EnableCaching//使用redis@EnableRedisHttpSession//服务注册发现@EnableDiscoveryClient@EnableFeignClients//实体扫描@EntityScan(basePackages = {"com.mo

2021-12-01 16:32:02 429

原创 okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody

okhttp3.RequestBody.create(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;这个错是maven冲突了,配置一下就好了<dependency> <groupId>org.web3j</groupId> <artifactId>core</artifactId> <versi

2021-11-22 17:37:51 5536

原创 Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its

项目启动时报错Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.13.找了好几个方法都不行,后来rebuild project后重启项目好了rebuild大法好...

2021-11-22 16:45:58 1723

原创 Linux下tomcat指定jdk路径

在tomcat/bin下的catalina.sh下添加以下两句代码置顶就可export JAVA_HOME= /home/tomcat/jdk1.6.0_45export JRE_HOME= /home/tomcat/jdk1.6.0_45/jre

2021-11-01 18:32:35 2013

原创 Linux部署tomcat项目

1、项目生成war包2、部署tomcat3、部署jdk4、部署项目

2021-10-30 21:21:28 553

原创 tomcat项目生成war包

1、点

2021-10-30 21:07:46 2098

原创 @Slf4j是什么

@Slf4j是用来打印日志的,相当于下面这行代码。private final Logger logger = LoggerFactory.getLogger(当前类名.class);@Slf4j是添加在类上的注解,使用如下@Service@Slf4jpublic class TestServiceImpl implements TestService { @Override public String getHello(String s) { log.error(

2021-10-26 15:59:52 3006

原创 spring关于缓存的注解使用@CacheConfig,@Cacheable,@CachePut,@CacheEvict,@Caching

总述目前的spring boot项目使用到了redis缓存,再次记录一下关于缓存的注解主要用到的是这四个import org.springframework.cache.annotation.CacheConfig;import org.springframework.cache.annotation.CacheEvict;import org.springframework.cache.annotation.Cacheable;import org.springframework.cache.

2021-10-26 14:53:53 3621

原创 idea中将jar包放入lib没有生效

问题描述:这是一个老项目,我将需要内嵌的sdk包放入lib中,结果无法调用生效,如图可以看到其他正常的jar包左侧有个箭头,而我导入的没有,应该是没有加载进去导致的点击File-Project Stucture在linraies没有找到我导进去的jar包解决方法:点击+,在lib下找到自己要导入的包,选中,ok,ok返回查看,jar包左侧也出现了箭头,说明导入成功最后,重启项目生效!...

2021-10-26 11:24:20 7742 3

原创 报错Consider defining a bean of type ‘org.springframework.http.codec.ServerCodecConfigurer‘

springBoot项目启动报错Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.#[core-DESKTOP-7MF0MCO.log]# 2021-10-18 17:56:22 ERROR [main] org.springframework.boot.diagnostics.LoggingFailureAnalysisRepo

2021-10-18 18:01:12 6842 1

原创 报错Consider defining a bean of type ‘com.xxx.service.Service‘ in your configuration.

springboot项目启动报错Description:Field districtService in com.imp.controller.impDocController required a bean of type 'com.imp.service.impDocService' that could not be found.The injection point has the following annotations: - @org.springframework.bean

2021-10-18 17:54:04 6375

原创 报错Command line is too long. Shorten command line for XXXApplication

项目启动报,`Command line is too long. Shorten command line for XXXApplication.......`显示因命令过长而报错经查询、验证,加一条配置信息就好了进入.idea/,打开workspace.xml文件,检索到 component name="PropertiesComponent"位置加入一行代码<property name="dynamic.classpath" value="true" />最后重启项

2021-10-18 17:44:32 2150

原创 报错Can‘t load AMD 64-bit .dll on a IA 32-bit

WARNING: The APR based Apache Tomcat Native library failed to load. The error reported was [D:\Software\apache-tomcat-6.0.53\bin\tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform]java.lang.UnsatisfiedLinkError: D:\Software\apache-tomcat-6

2021-10-18 17:36:24 296

原创 报错java.lang.NoClassDefFoundError: org/jaxen/JaxenException

在前端传参xml格式的字符串时Document document = null; SAXReader reader = new SAXReader(); try { document = reader.read(new ByteArrayInputStream(new String(in .getBytes("UTF-8"), "UTF-8").getBytes("UTF-8"))); } ca

2021-09-16 10:25:32 270

原创 @Modifying注解与Can not issue data manipulation statements with executeQuery().

我是在使用Spring Data jpa中遇到这个问题的具体报错如下#[admin-DESKTOP-7MF0MCO.log]# 2021-09-10 18:01:49 WARN [http-nio-8080-exec-3] org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: S1009#[admin-DESKTOP-7MF0MCO.log]# 2021-09-10 18:01:49 ERROR [http

2021-09-10 18:11:01 146

原创 class字段转换工具类

这个工具类是将一个类中与另一个类中相同字段的值复制过去通常在SpringBoot中,用于实体与视图之间的转换import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.beans.BeanUtils;import java.util.ArrayList;import java.util.Collection;import java.util.List;/** * 转换工具类 */p

2021-09-10 15:56:16 209

原创 报错Not a managed type: class com.dj.imp.web.model.DjOperationLog

Error creating bean with name 'operationLogRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.dj.imp.core.model.ImpConfigTrans 在使用Spring JPA时,发生了这个报错是说createBean失败,Not a

2021-09-09 11:27:29 1435

原创 springBoot使用@Aspect实现日志处理

这里要用到spring的aop原理,也就是我们常说的面向切面编程,这个功能十分好用,可以将不同业务点横刀切开,进行处理,经常用于日志、权限、缓存等想仔细了解AOP,可以好好看一下这篇文章,写的太棒了。Spring AOP 实现原理在springBoot中使用aop还是非常方便的,可以使用注解来代替繁琐的代码1、加入依赖<dependency> <groupId>org.springframework.boot</groupId> <arti

2021-09-03 17:55:40 548

原创 svn安装使用以及各种问题解决

今天遇到了svn安装的各种坑,诸事不顺,简单记录一下1、svn的安装及环境变量1.1、下载安装包首先官网下载安装包,我使用的是这个TortoiseSVN-1.8.7.25475-x64-svn-1.8.9.msi下载好安装包后,一路点next,可以选择自己想要安装的地址,到了这个界面要注意,默认是图中这样的 client tools是没有选中的1.2、注意选项现在我们要选中,如图所示选择will be install on local就好了,这个没有选择的话,就会出现问题21.3、检验

2021-09-03 16:09:45 2875

原创 SpringBoot中的@CrossOrigin注解

对于源码是如此解释的Annotation for permitting cross-origin requests on specific handler classes and/or handler methods.用于允许特定处理程序类和/或处理程序方法上的跨源请求的注释。在SpringBoot使用中,跨域是常见的问题,如果是局部处理跨域,则只需要加入这个注解,如下所示@CrossOriginpublic class ImpCoreController {}@CrossOrigin

2021-09-02 09:11:16 2113

原创 SpringBoot中的@Data注解

在SpringBoot使用过程中,@data注解十分好用平时我们定义一个实体类的话,需要重写它的构造方法、get、set、toString、hashcoe、equals等方法,这都占用了大量的篇幅而使用@Data注解则可以自动装配这些方法我们先看一下源码@Data is a convenient shortcut annotation that bundles the features of@ToString, @EqualsAndHashCode, @Getter / @Setter and @

2021-08-31 18:36:31 3780

原创 Oracle 表字段的创建、删除、修改、查询

1、创建字段1 添加字段:alter table 表名 add (字段 字段类型) ['默认值'] [非空];alter table student add (name varchar2(10)) ['张三'] [not null];2.添加备注:comment on column 库名.表名.字段名 is '备注'; comment on column ocal.student.name is '姓名';2、删除字段alter table 表名 drop (字段);

2021-08-09 20:13:18 1332

空空如也

空空如也

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

TA关注的人

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