Error querying database. Cause: java.lang.IllegalArgumentException:Failed to decrypt.(错误笔记)
java.lang.IllegalArgumentException:Failed to decrypt
从错误可以看出,解密失败。
原因是你在数据库连接配置的地方,设置了加密。即:
config.decrypt=true
将其改成:
config.decrypt=false
问题就可以解决。
public-key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAITOx1pKAT9xh7cfoZqUw6SLjgl/Y44M2XUAw37aRndmku+FSdGp9PXGwJYoeXt/TbxR1DSdd7S2+/s1cUsvvDMCAwEAAQ==
spring:
http:
encoding:
charset: UTF-8
force: true
enabled: true
datasource:
druid:
url: jdbc:mysql://localhost:3306/fairchild?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
# url: jdbc:mysql://192.168.31.196:3306/fairchild?useSSL=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
# connection-properties: config.decrypt=true;config.decrypt.key=${public-key}
initial-size: 5
min-idle: 10
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 2000
min-evictable-idle-time-millis: 60000
max-evictable-idle-time-millis: 9000000
test-while-idle: true
test-on-borrow: false
test-on-return: false
validation-query: select 1
pool-prepared-statements: true
max-open-prepared-statements: 20
async-init: true
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: druid
login-password: druid
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
session-stat-enable: false
profile-enable: true
filter:
wall:
enabled: true
db-type: mysql
config:
enabled: true
aop-patterns: cn.com.coding4fun.*
jpa:
show-sql: true
generate-ddl: false
hibernate:
ddl-auto: none
open-in-view: true
properties:
hibernate:
format_sql: true
order_updates: true
order_inserts: true
jdbc:
batch_size: 50
fetch_size: 50
javax:
cache:
provider: org.ehcache.jsr107.EhcacheCachingProvider
uri: classpath:hibernate-ehcache.xml
missing_cache_strategy: create
enable_lazy_load_no_trans: true
cache:
use_query_cache: true
use_second_level_cache: true
region_prefix: jcache-hibernate
use_minimal_puts: false
use_reference_entries: true
use_structured_entries: false
auto_evict_collection_cache: false
hibernate.cache.default_cache_concurrency_strategy: read-only
region:
factory_class: jcache
cache:
jcache:
provider: org.ehcache.jsr107.EhcacheCachingProvider
config: classpath:ehcache.xml
messages:
basename: i18n/messages
encoding: UTF-8
server:
port: 8081
tomcat:
uri-encoding: UTF-8
Error querying database. Cause: java.lang.IllegalArgumentException:Failed to decrypt.(错误笔记)的更多相关文章
- Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …
编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.Nested ...
- 搭建Mybatis 出现 Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mapper.BatchCustomer.findBatchCustomerOneToOne
Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection doe ...
- spring boot :error querying database. Cause: java.lang.IllegalArgumentException: dataSource or dataSourceClassName or jdbcUrl is required
配置多个数据源启动报错,error querying database. Cause: java.lang.IllegalArgumentException: dataSource or dataSo ...
- ### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: cn.xiaojian.blog.po.BlogType and java.lang.String ### Cause: java.lang.IllegalArgumentException: ...
### Error querying database. Cause: java.lang.IllegalArgumentException: invalid comparison: cn.xiaoj ...
- mybatis查询异常-Error querying database. Cause: java.lang.ClassCastException: org.apache.ibatis.executor.ExecutionPlaceholder cannot be cast to java.util.List
背景,mybatis查询的时候直接取的sqlsession,没有包装成SqlSessionTemplate,没有走spring提供的代理. 然后我写的获取sqlsession的代码没有考虑到并发的情况 ...
- org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.lang.NumberFormatException: For input string: "W%" ### Cause: java.lang.NumberFormatException: For input s
一个常见的myBatis xml文件中的引号错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying data ...
- java.lang.IllegalArgumentException: Failed to decrypt.
加密失败. 附加信息: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Co ...
- mybatis 参数格式异常-- Error querying database. Cause: java.lang.NumberFormatException: For input string
mybatis中 <if></if>标签中进行判断时,如果传入的时字符格式和数字进行判断需要将数字进行转译,否则默认是数字和数字进行比较,这是就会出现参数格式异常如<if ...
- Error updating database. Cause: java.lang.IllegalArgumentException: invalid comparison: java.util.Date and java.lang.String异常处理
问题原因:Mybatis中对于时间参数进行比较时的一个BUG. 如果拿传入的时间类型参数与空字符串‘‘进行对比判断则会引发异常.,所以应该去掉该判断, 只保留非空判断就正常了 <if test= ...
随机推荐
- ArrayList源码阅读(小白的java进阶)
ArrayList(线程不安全) ArrayList是一个其容量能够动态增长的动态数组 继承关系 构造方法 是符合collection父接口的规范的 //传0则设置为默认容量 public Array ...
- github个人主页 阿里云域名的绑定
域名解析 我在阿里云上买了一个新域名:gaolu.name,我已经在GitHub Pages上建立了自己的博客:http://gaolu1215.github.io.现在我希望将gaolu.name映 ...
- python-顺序串基本操作的实现
1 #*********************************************************************** ** 2 #> File Name: seq ...
- codefoces B - Phoenix and Beauty
原题链接:https://codeforc.es/problemset/problem/1348/B 题意:告诉我们一个数组及其长度和k,判断是否可以构造一个新数组使得每K段长度和都相等. 思路:首先 ...
- P1164_小A点菜(JAVA语言)
思路 简单动态规划问题 题目背景 uim神犇拿到了uoi的ra(镭牌)后,立刻拉着基友小A到了一家--餐馆,很低端的那种. uim指着墙上的价目表(太低级了没有菜单),说:"随便点" ...
- 封装一个postMessage库,进行iframe跨域交互
这是近期个人在开发chrome插件时的其中一个小总结.还有很多没有总结出来.因为目前插件还在迭代中,(herry菌插件,用于B站C站),属于个人业余的一个小项目.还有很多功能没有实现,以及还需要再看能 ...
- iNeuOS工业互联平台,发布:消息管理、子用户权限管理、元件移动事件、联动控制和油表饼状图,v3.4版本
目 录 1. 概述... 2 2. 平台演示... 2 3. 消息管理... 2 4. 子用户权限管理... 3 5. 元件移动事件... ...
- 一文读懂MySql主从复制机制
作为一个关系型数据库,MySQL内建地提供数据复制机制,这使得在使用时,可以基于其复制机制实现高可用架构等高级特性,从而使得MySQL无需借助额外的插件或其他工具就具备适用于生产环境.这是MySQL得 ...
- 三次给你讲清楚Redis之Redis是个啥
摘要:Redis是一款基于键值对的NoSQL数据库,它的值支持多种数据结构:字符串(strings).哈希(hashes).列表(lists).集合(sets).有序集合(sorted sets)等. ...
- redis安装、配置、启动
一.redis默认安装位置:/usr/local/bin redis-benchmark:性能测试工具,可以在自己本子运行,看看自己本子性能如何,服务启动起来后执行redis-check-aof:修复 ...