2021-03-26 springboot2.4的项目,打包成war包到tomcat7下面运行启动失败,测试了下,修改如下,可以正常访问1、打包之前,修改pom.xml里面的<!-- <tomcat.version>8.5.64</tomcat.version> --> ,把这个注释放开,指定运行的tomcat版本2、修改application-prod.yml配置文件中的,因为开发使用的是p6spy,会输出sql执行时间等,打war包发布到tomcat时需要修改使用普...
Jasper连接Oracle报:oracle.jdbc.driver.OracleDriver cannot be found by net.sf.jasperreports_6.6.0.final 在TIBCO Jaspersoft Studio-6.6.0中创建oracle连接的时候选择oracle,提示,net.sf.jasperreports.engine.JRRuntimeException: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver cannot be found by net.sf.jasperreports_6.6.0.final at net.sf.jasperreports.data.j
ClassNotFoundException: com.lowagie.text.pdf.PdfGState 折腾报表导出,出现这个错误,java.lang.ClassNotFoundException: com.lowagie.text.pdf.PdfGState发现pom中引用了 <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.16.0</ver..
??? redis watch 实现乐观锁秒杀 运行一万笔,抢10笔商品,运行完毕,抢购控制成功,但是运行失败和总次数不够一万,这个问题还在排查参考https://www.jianshu.com/p/43b786079a1e@RunWith(SpringRunner.class) @SpringBootTestpublic class RedisWatchTest { private static final Logger logger = LoggerFactory.getLogger(RedisTransactionTest.c..
linux 下 java 单个class文件执行和多个class文件打包调用,执行 银行项目,给个linux机器权限控制的比较厉害,之前有需求需要切割个日志文件,所以开始就写一个java文件,然后编译成class,直接运行,还算方便,后来需求越来越多,需要查询数据,需要操作excel,还因为字段处理等需要引入更多的累,打包就很麻烦了,备注: 1、JAVAC生成class运行的时候需要手工去掉最上面的包名,防止出现找不到文件异常2、执行sql操作的时候需要手工把oracle-ojdbc6-11.2.0.3.0.jar放到C:\Program Files\Java\jre1..
redis 保存对象 io.lettuce.core.RedisCommandExecutionException: ERR value is not an integer or out of ran 以前redis保存json格式数据都是这样写 public boolean set(String key, Object value) { boolean result = false; try { // 使用 JSONObject.toJSONString() 处理要存储的数据 stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(va
NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.data.redis.core.Redis redis 使用的时候这样都正常, @Autowired private RedisTemplate<String, String> strRedisTemplate; @Autowired private RedisTemplate<String, Serializable> serializableRedisTemplate;这样使用报错, @Autowired private RedisTemplate<String, Object> r
mybatis-plus 字段类型处理器,查询为空,以及查询转换json异常,(no Creators, like default constructor, exist): cannot deseri 用到mybatis-plus时,字段类型处理器类型处理器,用于 JavaType 与 JdbcType 之间的转换,用于 PreparedStatement 设置参数值和从 ResultSet 或 CallableStatement 中取出一个值,本文讲解mybaits-plus内置常用类型处理器如何通过TableField注解快速注入到mybatis容器中。按照理解,其实就是一个帮助我们保存和查询时把对应的对象转换为json格式的数据,pojo层添加字段类型,对应oracle...
mybatis-plus 动态表名 需要注意的小问题 按照https://mybatis.plus/guide/interceptor-dynamic-table-name.html#dynamictablenameinnerinterceptor的项目mybatis-plus-sample-dynamic-tablename运行正常,整合到我的项目中却无法转换,检查后发现,是表名大小写匹配的问题@TableName("DEMO")//@Accessors(chain = true)//public class Demo implements...
mybatis-plus公共字段自动填充 date型失败,org.apache.ibatis.type.TypeException: Error setting null for parameter entity 里面直接添加// // 更新时间(修改的时候填充)// @TableField(fill = FieldFill.UPDATE)// private Date updateTime; @TableField(fill = FieldFill.INSERT_UPDATE) private String operator;编写MetaObjectHandler@Slf4j@Componentpublic class MyMetaObje
mybatis-plus p6spy 报错,java.lang.NoClassDefFoundError: Could not initialize class com.p6spy.engine.sp 按照 mybatis-plus的文档来加入 p6spy 后,执行单元测试出现两个错误,https://baomidou.com/guide/p6spy.html执行 SQL 分析打印该功能依赖p6spy组件,完美的输出打印 SQL 及执行时长3.1.0以上版本错误1:java.lang.NoClassDefFoundError: Could not initialize class com.p6spy.engine.spy.P6ModuleManager at com.p...
HikariPool OracleDriver was not found, trying direct instantiation. + Driver does not support g springboot2.4 配置数据库连接池type: com.zaxxer.hikari.HikariDataSource查询的时候 报错,但是依然可以查询出数据,2020-12-01 15:51:33.766 INFO 35480 --- [nio-8080-exec-7] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2020-12-01 15:51:33.770 WARN 35480 -
STS/MyEclipse安装lombok , lombok The method setName(String) is undefined for the type 使用mybatis-plus 时配合lombok,pom.xml文件中已经引入 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <scope>provided</scope> </dependency>然后使用mybatis-plus的代码生成器生
Description Resource Path Location Type Missing artifact net.sf.json-lib:json-lib:jar:2.4 pom.xml /m 缺一个包,找到pom地址,加到pom文件中,<!-- https://mvnrepository.com/artifact/net.sf.json-lib/json-lib --><dependency> <groupId>net.sf.json-lib</groupId> <artifactId>json-lib</artifactId> <version>2.4</version&g
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of ty springboot2.4 + mybatis-plus3.4.1 启动报错 . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =====
springboot 2.2.3 升级到 2.4.0单元测试区别 原先单元测试import org.junit.Test; 然后运行正常,现在运行报错,import org.junit.Test; 换成 import org.junit.jupiter.api.Test; 后运行正常。
Property ‘spring.http.encoding.charset‘ is Deprecated: Use ‘server.servlet.encoding.charset‘ instead springboot 2.2.3 版本换成 2.4.0之后配置文件中的配置报错,提示Property 'spring.http.encoding.charset' is Deprecated: Use 'server.servlet.encoding.charset' instead# http:# encoding:# charset: UTF-8# enabled: true# force: true修改为server: port: 80
springboot NoClassDefFoundError: org/apache/tomcat/util/descriptor/tld/TldParser spring-boot-starter-parent 从<version>2.2.3.RELEASE</version> 升级到<version>2.4.0</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</...
mybatis 换 mybatis-plus 后启动异常,sqlSessionFactory OutOfMemoryError: GC overhead limit exceeded 老项目使用 <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.5.5</version> </dependency>替换为 <dependency> <groupId>..
mybatis-plus 代码生成器NPE 无法创建文件,请检查配置信息 NullPointerException: null 把老项目的底层mybaitis 替换为mybatis-plus ,运行代码生成器,报错,请输入模块名:batch请输入表名,多个英文逗号分割:MYBATIS_PLUS_DEMO10:55:47.164 [main] DEBUG com.baomidou.mybatisplus.generator.AutoGenerator - ==========================准备生成文件...==========================10:55:48.208 [main] ER