当前位置: 首页 > 知识库问答 >
问题:

带有Spring的Jasypt...记录器配置

温亮
2023-03-14
protected void loadProperties(Properties props) throws IOException {
        if (this.locations != null) {
            for (Resource location : this.locations) {
                if (logger.isInfoEnabled()) {
                    logger.info("Loading properties file from " + location);
                }

谢谢

共有1个答案

澹台文博
2023-03-14

经过大量搜索,我才找到结果。..为了解决这个问题,我们必须在应用程序使用的记录器配置中设置Jasypt的记录器属性。例如

name=“log4j.logger.org.jasypt”>错误

这将解决问题。

 类似资料:
  • 我正在使用jasypt spring boot starter:1.14和spring-boot-2.0.0。M2 如果application.properties在类路径(src/main/资源)中可用,它工作得非常好 即使应用程序运行正常,Spring boot也能正常工作。属性放在运行spring boot jar的文件夹中(默认情况下,它在当前文件夹中查找application.prope

  • 我在试着验证Mockito的记录器信息。 但是,我不能运行我的junit类来覆盖所有代码行。 你知道为什么吗? 需要但未调用:mockappender.doappend();->在AppTest.TestWithover3Element(AppTest.java:52)实际上,与这个模拟没有任何交互。

  • 在开发和测试环境下,根记录器级别为DEBUG或info。spring-boot横幅在应用程序启动时显示: logging-devel.xml(显示横幅) logging-production.xml(未显示横幅)

  • 我使用命令行加密和解密密码,它工作得很好,所以我确信我的加密和解密密码是准确的,但是当我尝试启动我的spring应用程序时,我得到了这个错误。因此任何帮助(•-•)

  • 我使用ESAPI jar进行验证。当我调用isValidInput(Context,input.trim(),ValidateConstant时。APLHA_NUMERIC_TYPE,最大长度,真);或isValidInput(上下文,输入,ValidateConstant.NUMERIC_TYPE,maxLength,true);并且输入错误,带有单独的字符。然后它抛出一些像 当我单独执行程序时

  • Jasypt Spring Boot 为 Spring Boot 项目中的属性源(property sources)提供加密支持。 有三种方法可以在项目中集成 jasypt-spring-boot: 如果 Spring Boot 项目中使用了 @SpringBootApplication 或者 @EnableAutoConfiguration ,在项目里添加jasypt-spring-boot-s