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

 

 

 

 

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

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

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 状态模式state_迭代器模式

    状态模式state_迭代器模式状态模式 State动机模式定义实例结构要点总结笔记动机在软件构建过程中,某些对象的状态如果改变,其行为也会随之而发生变化,比如文档处于只读状态,其支持的行为和读写状态支持的行为就可能不同.如何在运行时根据对象的状态来透明地更改对象的行为?而不会为对象操作和状态转换之间引入紧耦合模式定义允许一个对象在其内部状态改变时改变它的行为.从而使对象看起来似乎修改了其行为.从而使对象看起来似乎修改了其行为.从而使对象看起来似乎修改了其行为.实例朴素根据状态来执行下一步enum NetworkStat

    2022年8月11日
    0
  • Oracle DBA 路途遥远「建议收藏」

    Oracle DBA 路途遥远「建议收藏」好用的OracleDBA为什么这么难找? 这不但是很多CIO的痛,也是很多IT主管搅尽脑汁也解决不了的问题。可那么多从ORACLE培训班拿到OCP认证的人跑哪里去了呢? 小白是一个拥有OCP证照,且对数据库本身的架构、运作原理有一定了解的数据库管理员。原以为一切都没问题的,无奈小白刚一就任,就面临到替换公司数据库系统主机的问题。小白没有程序开发与主机系统管理等经验,小白是那种一毕

    2022年9月26日
    0
  • python re.compile() 详解——Python正则表达式「建议收藏」

    python re.compile() 详解——Python正则表达式「建议收藏」1概述当我们在Python中使用正则表达式时,re模块内部会干两件事情:编译正则表达式,如果正则表达式的字符串本身不合法,会报错;用编译后的正则表达式去匹配字符串。那么如果一个正则表达式要重复使用几千次,出于效率的考虑,我们是不是应该先把这个正则先预编译好,接下来重复使用时就不再需要编译这个步骤了,直接匹配,提高我们的效率2compile()预编译十分的简单,re.co…

    2022年9月1日
    0
  • S3服务器规格和性能指标,云服务器s3与s4

    S3服务器规格和性能指标,云服务器s3与s4云服务器s3与s4内容精选换一换创建一台或多台云服务器。V1.1版本创建云服务器的接口兼容了V1版本创建云服务器(按需)的功能,同时合入新功能,支持创建包年/包月的弹性云服务器。本接口为异步接口,当前创建云服务器请求下发成功后会返回job_id,此时创建云服务器并没有立即完成,需要通过调用查询任务的执行状态查询job状态,当Job状态为SUCCESS时代表云服务器创在申请SAPS/4HAN…

    2022年5月11日
    58
  • 批处理 for命令_文件批处理命令

    批处理 for命令_文件批处理命令对所有的批处理初学者来说,for的应用是最难理解以及掌握的。本文由浅入深,为大家专门讲解for的用法,希望大家喜欢。首先应该明确的是,for不是一个简单的命令,它的用法比较复杂,它还可以带四个参数(/L/D/R/F),其中:/L和/F参数是最经常用到的。当然,它本身也可以不带参数,下面我们通过具体的例子来讲解for的运用。一、不带参数的for:@echo

    2022年10月12日
    0
  • Jenkins学习一:Jenkins是什么?

    Jenkins学习一:Jenkins是什么?第一章Jenkins是什么?Jenkins是一个可扩展的持续集成引擎。主要用于:l持续、自动地构建/测试软件项目。l监控一些定时执行的任务。Jenkins拥有的特性包括:l易于安装-只要把jenkins.war部署到servlet容器,不需要数据库支持。l易于配置-所有配置都是通过其提供的web界面实现。l集成RSS/E-mail通过RSS发布构建结果…

    2022年6月2日
    48

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

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