java-version未找到命令_org.apache.catalina.core.stand

java-version未找到命令_org.apache.catalina.core.standspringboot2.x工程,将jasypt升级到3.x–>3.0.3后,配置一个属性为加密,工程启动后报错如下############################################################

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

springboot 2.x工程,将jasypt升级到3.x–>3.0.3后,配置一个属性为加密,工程启动后报错如下


####  #    # #####  ###### 
#    # #    # #    # #      
#      #    # #####  #####  
#      #    # #    # #      
#    # #    # #    # #      
####   ####  #####  ###### 
Application Version: 
Spring Boot Version: 2.4.2 (v2.4.2)
2021-02-12 19:05:06.093  INFO 45956 --- [           main] com.cube.CubeBootApplication             : Starting CubeBootApplication using Java 1.8.0_181 on mymac.local with PID 45956 (/Users/chiwei/myspace/git_project/cube-project/target/classes started by chiwei in /Users/chiwei/myspace/git_project/cube-project)
2021-02-12 19:05:06.098  INFO 45956 --- [           main] com.cube.CubeBootApplication             : The following profiles are active: dev
2021-02-12 19:05:07.951  INFO 45956 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2021-02-12 19:05:07.956  INFO 45956 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2021-02-12 19:05:08.012  INFO 45956 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 18 ms. Found 0 Redis repository interfaces.
2021-02-12 19:05:08.391  INFO 45956 --- [           main] ptablePropertiesBeanFactoryPostProcessor : Post-processing PropertySource instances
2021-02-12 19:05:08.427  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy
2021-02-12 19:05:08.429  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource servletConfigInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2021-02-12 19:05:08.429  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource servletContextInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper
2021-02-12 19:05:08.430  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper
2021-02-12 19:05:08.430  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper
2021-02-12 19:05:08.430  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2021-02-12 19:05:08.430  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource Config resource 'file [config/application-dev.properties]' via location 'optional:file:./config/' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2021-02-12 19:05:08.430  INFO 45956 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource Config resource 'file [config/application.properties]' via location 'optional:file:./config/' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2021-02-12 19:05:08.597  INFO 45956 --- [           main] c.u.j.filter.DefaultLazyPropertyFilter   : Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
2021-02-12 19:05:08.889  INFO 45956 --- [           main] c.u.j.r.DefaultLazyPropertyResolver      : Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2021-02-12 19:05:08.893  INFO 45956 --- [           main] c.u.j.d.DefaultLazyPropertyDetector      : Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2021-02-12 19:05:09.360  INFO 45956 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9276 (http)
2021-02-12 19:05:09.379  INFO 45956 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-02-12 19:05:09.379  INFO 45956 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-02-12 19:05:09.554  INFO 45956 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/cube]   : Initializing Spring embedded WebApplicationContext
2021-02-12 19:05:09.554  INFO 45956 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3319 ms
2021-02-12 19:05:09.811  INFO 45956 --- [           main] c.u.j.encryptor.DefaultLazyEncryptor     : String Encryptor custom Bean not found with name 'jasyptStringEncryptor'. Initializing Default String Encryptor
2021-02-12 19:05:09.833  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.algorithm, using default value: PBEWITHHMACSHA512ANDAES_256
2021-02-12 19:05:09.834  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.key-obtention-iterations, using default value: 1000
2021-02-12 19:05:09.834  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.pool-size, using default value: 1
2021-02-12 19:05:09.835  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.provider-name, using default value: null
2021-02-12 19:05:09.835  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.provider-class-name, using default value: null
2021-02-12 19:05:09.835  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.salt-generator-classname, using default value: org.jasypt.salt.RandomSaltGenerator
2021-02-12 19:05:09.837  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.iv-generator-classname, using default value: org.jasypt.iv.RandomIvGenerator
2021-02-12 19:05:09.838  INFO 45956 --- [           main] c.u.j.c.StringEncryptorBuilder           : Encryptor config not found for property jasypt.encryptor.string-output-type, using default value: base64
2021-02-12 19:05:10.134  WARN 45956 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'myConfig': Could not bind properties to 'MyConfig' : prefix=cube.boot, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'cube.boot.system-name' to java.lang.String
2021-02-12 19:05:10.138  INFO 45956 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-02-12 19:05:10.155  INFO 45956 --- [           main] ConditionEvaluationReportLoggingListener : 
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-12 19:05:10.219 ERROR 45956 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'cube.boot.system-name' to java.lang.String:
Reason: Failed to bind properties under 'cube.boot.system-name' to java.lang.String
Action:
Update your application's configuration

Failed to bind properties under ‘cube.boot.system-name’ to java.lang.String:

报错信息说明自定义的属性无法绑定到java.lang.String这个类型上,猜测基本是解密失败了,解不出完整的一个字符串;

网上搜索后基本要求将jasypt降级到2.x版本,亲测的确可行,application配置如下

jasypt.encryptor.password=mycmccsalt
jasypt.encryptor.algorithm= PBEWithMD5AndDES

jasypt github主页上其实有这个问题的issue,还挺长的,认证看完就找到答案了

https://github.com/ulisesbocchio/jasypt-spring-boot/issues/154

因为3.x版本的默认加密算法变了,所以对应配置文件加密算法配置得修改,同时加密的方法也得用新的加密算法计算出加密字符串

java-version未找到命令_org.apache.catalina.core.stand

对应新的配置文件内容如下:

jasypt.encryptor.password=mycmccsalt
jasypt.encryptor.iv-generator-classname=org.jasypt.iv.NoIvGenerator
jasypt.encryptor.algorithm=PBEWithMD5AndTripleDES

启动访问,问题解决。

java-version未找到命令_org.apache.catalina.core.stand

 

 

 

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/189373.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • X3D.GIS[通俗易懂]

    X3D.GIS[通俗易懂]2019独角兽企业重金招聘Python工程师标准>>>…

  • windows 怎样关闭redis

    windows 怎样关闭redis

    2021年10月16日
  • 【综合评价方法 变异系数权重法】指标权重确定方法之变异系数权重法

    【综合评价方法 变异系数权重法】指标权重确定方法之变异系数权重法变异系数法是直接利用各项指标所包含的信息,通过计算得到指标的权重。是一种客观赋权的方法。此方法的基本做法是:在评价指标体系中,指标取值差异越大的指标,也就是越难以实现的指标,这样的指标更难反映被评价单位的差距。由于评价指标体系中的各项指标的量纲不同,不宜直接比较其差别程度。为了消除各项评价指标的量纲不同的影响,需要用各项指标的变异系数来衡量各项指标取值的差异程度。各项指标的变异系数公式如下:…

  • mybatis插件安装提示证书问题_maven 插件

    mybatis插件安装提示证书问题_maven 插件先占位,在myeclipse下安装mybatis generator

  • LDAP 中的 RDN「建议收藏」

    LDAP 中的 RDN「建议收藏」什么是RDN,RDN和DN又有什么关系呢?很多第一次接触到LDAP的童鞋,经常会被一堆名字搞得晕头转向。RDN(relativedistinguishedname)中文翻译就是相对专有名字。一般指dn逗号最左边的部分,如cn=baby。DN是由多个RDN组织而成的。CN=cwikius,ou=Users,dc=jumpcloud,dc=com上面的RDN就不是一个了,这个DN的RDN就有4个,分别是:CN=cwikius ou=Use

  • IDEA 安装步骤「建议收藏」

    IDEA 安装步骤「建议收藏」1、下载与安装下载地址:https://www.jetbrains.com下载完成后安装选择安装的位置安装完成激活码:K03CHKJCFT-eyJsaWNlbnNlSWQiOiJLMDNDSEtKQ0ZUIiwibGljZW5zZWVOYW1lIjoibnNzIDEwMDEiLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoi…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号