- 博客(17)
- 资源 (7)
- 收藏
- 关注
原创 SpringBoot:cannot be resolved to absolute file path because it does not reside in the file system
cannot be resolved to absolute file path because it does not reside in the file system
2023-09-04 17:18:16
2137
2
原创 spring4+hibernate4报错:Another unnamed CacheManager already exists in the same VM
spring4 hibernate4 net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide unique names for each CacheManager in the config or do one of following:1. Use one of t
2023-07-26 17:28:39
1004
原创 spring4+hibernate4报错:not allowed in read-only mode;Could not obtain transaction-synchronized Session
Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker from transaction definition.Could not obtain transaction-synchronized Session for current thread
2023-07-26 16:55:55
1412
原创 spring4+hibernate4生成外键报错: Cannot add or update a child row: a foreign key constraint fails
spring4+hibernate4生成外键报错: Cannot add or update a child row: a foreign key constraint fails
2023-07-26 16:30:28
149
原创 无法读取方案文档 ‘http://www.springframework.org/schema/tx/spring-tx-4.2.xsd‘, 原因为 1) 无法找到文档; 2) 无法读取文档; 3)
无法读取方案文档 'http://www.springframework.org/schema/tx/spring-tx-4.2.xsd', 原因为 1) 无法找到文档; 2) 无法读取文档; 3) 文档的根元素不是 。
2022-11-04 14:59:52
1452
原创 EasyExcel报错 ExcelDataConvertException: Can not find ‘Converter‘ support class List
怎样处理EasyExcel报错 ExcelDataConvertException: Can not find 'Converter' support class List. 怎样自定义EasyExcel Converter
2022-11-04 13:01:04
13181
2
原创 spring-boot-maven-plugin:部署原始包并生成本地可执行包
spring-boot-maven-plugin的 repackage 默认用可执行包代替原始包。如果项目需要部署原始包,但也需要生成可执行包供本地运行,可配置attach为false。此时也生成原始包和可执行包,只有原始包会被安装部署。官方文档<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifa
2021-01-03 16:02:15
1322
原创 java Integer对象的比较
以下代码会输出什么?Integer a100 = 100;Integer b100 = 100;Integer a1000 = 1000;Integer b1000 = 1000;Integer aNew100 = 100;Integer bNew100 = 100;System.out.println(a100 == b100);System.out.println(a1000 == b1000);System.out.println(aNew100 == bNew100);测
2020-12-25 17:57:54
181
原创 java三元表达式因自动拆箱导致的NPE问题
开发中发生了奇怪的问题,类似如下的代码NPE了。。。boolean flag = false;Integer a = null;Integer n = flag ? 1 : a;原来是在计算三元表达式结果时,a变量自动拆箱了。经 javap 反汇编发现,确实调用了Integer.intValue() 方法。在三元表达式计算中,当第二、第三位操作数中有基本类型和对象时,对象就会拆箱为基本类型进行操作。所以如果使用了基本类型或者隐式的使用了基本类型,需要考虑NPE问题。表达式中未使用基本类型,
2020-12-24 19:28:58
1836
1
原创 Navicat连接MySQL报错:1251-Client does not support authentication protocol requested by server
Navicat连接MySQL报错:1251-Client does not support authentication protocol requested by server;consider upgrading MySQL clientMySQL版本:8.0.22解决方式:按顺序执行以下命令后再用Navicat连接:use mysql;alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘xxxxx
2020-12-10 16:16:04
174
原创 spring-boot-maven-plugin:介绍
spring-boot-maven-plugin是spring boot提供的maven打包插件。可打直接可运行的jar包或war包。官方文档地址使用2.2.1.RELEASE版本需要maven版本在2.0及以上,JDK在1.8及以上。引入插件<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId>
2020-12-08 17:52:03
39606
原创 spring-boot-maven-plugin:设置active profiles
以下示例将 active profiles 设置为 foo 和 bar。方式一,在pom文件里配置<build> <properties> <my.value>42</my.value> </properties> ... <plugins> ... <plugin> <groupId>org.spring
2020-12-07 19:49:40
1640
原创 spring-boot-maven-plugin:添加系统属性和环境变量
设置系统属性(system property)通过配置systemPropertyVariables 来设置系统属性(system property)。以下示例将 property1 设置为 test,将 property2 设置为 42,将property3设置为空字符串。<build> <properties> <my.value>42</my.value> </properties> ...
2020-12-07 19:39:03
3442
原创 spring-boot-maven-plugin:debug调试程序
spring-boot-maven-plugin的 run goal 可启动程序运行项目。但发现直接执行 spring-boot:run时,不能debug打断点点调试。spring-boot-maven-plugin的官方文档给出了原因和解决方式。原因run goal 默认将应用运行于 a forked process,通常方式设置的命令行参数不会作用于程序,因此直接使用run goal,是不能调试程序的。解决方式若想调试,或想设置其他JVM 参数,应配置 jvmArguments参数。方式一
2020-12-07 14:23:14
2277
原创 spring-boot-maven-plugin:打依赖包
使用spring-boot-maven-plugin插件打包时,默认生成两个包,以打jar包为例,生成的是*.jar和*.jar.original。这是因为spring-boot-maven-plugin的rapackage目标,是在 mvn package 执行之后,再次打包生成可执行的 jar包。repackage生成jar包的名称与 mvn package 生成的原始 jar/war包名称相同,而原始 jar包被重命名为 *.origin。这样生成的*.jar可直接运行,但不能被其他项目模块依赖。
2020-12-02 17:35:08
6806
原创 springboot logback no applicable action for [springProfile], current ElementPath is [[configuration]
在springboot项目里使用logback报如下错误14:25:46,762 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@3:72 - no applicable action for [springProperty], current ElementPath is [[configuration][springProperty]]14:25:46,762 |-ERROR in ch.qos.logback.core.joran.spi
2020-11-30 15:11:46
10659
1
原创 spring-boot-maven-plugin:打包时排除provided依赖
spring-boot-maven-plugin 插件提供spring boot的maven打包支持。项目中scope为provided的依赖,比如 lombok、mybatis-plus 等,只作用于编译阶段,编译完成就可以功成身退了。在spring maven打包时,provided依赖会排除在包外,但springboot maven打包时,还会将这些依赖打进 war 包的 lib-provided 文件夹里或 jar 包的 lib 文件夹里。springboot项目构建jar包或war包的命令为re
2020-11-30 14:05:50
8858
1
C++ Primer中文版(第五版)及源代码.part2 带书签目录
2016-07-12
C++ Primer中文版(第五版)及源代码.part1 带书签目录
2016-07-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人