spring-el

    0热度

    1回答

    我希望能够做的是: YAML: features: feature1: true feature2: false feature3: true 代码: @Value("${features}") private Map<String,Boolean> features; 我无法弄清楚使用什么Spring脚本语法来完成此操作(如果可能的话)

    0热度

    1回答

    我使用的是Spring批处理2.1.9,并且需要用一些文本和运行日期用#符号分隔来编写文件名。不幸的是我无法找到一种方式来显示#号而不会破坏表达式。我曾尝试以下格式,都无济于事:额外的英镑符号包括 File##{jobParameters[rundate]} File#{'#' + jobParameters[rundate]} File${'#'}#{jobParameters[rund

    2热度

    1回答

    我想补充一个个:文本选择选项(Thymeleaf), <option th:each="case : ${caseCategoryList}" th:value="${case.caseCategoryId}" th:text="${case.caseCategoryName} - ${case.caseCategoryCode}"></option> ,但我得到这个错误 08:28:05,5

    2热度

    1回答

    我正在与春天和百里香一起工作。 我需要从当前的URL中移除一个参数,我做这样的考虑: urlBuilder=${T(org.springframework.web.servlet.support.ServletUriComponentsBuilder).fromCurrentRequest()}, currentUrl=${urlBuilder.replaceQueryParam('page',

    0热度

    1回答

    我试图避免与传递第二个参数法列表大小的冗余。相反,我使用EL,但我有一个错误: org.hibernate.QueryException: Not all named parameters have been set: [$synthetic$__1] [SELECT distinct b FROM Book b join b.bookHashtags as ht where ht.hashtag

    0热度

    1回答

    我试图配置基于应用属性的Spring bean,我的最终目标是在下面的伪代码来描述: if ${my.config} <bean id="myBean" class="path.to.MyBeanImplOne" /> else <bean id="myBean" class="path.to.MyBeanImplTwo" /> end 其中my.config是一个布尔

    1热度

    2回答

    我有这个值的春天启动配置文件: @Value("#{new Integer('${db.pool.size}')}") private Integer dbPoolSize; @Value("#{new Integer('${db.minimum.idle}')}") private Integer dbMinimumIdle; 但是,当我开始我得到这个错误的应用程序: Caused

    0热度

    1回答

    我想动态配置上的createIndex标志: @Document(indexName = "#{@myindex}", createIndex = "#{@shouldIndex}") public class MyDocument { ... } 这将引发一个错误,因为预计的createIndex布尔。有什么办法从EL表达式返回布尔类型?

    2热度

    1回答

    长话短说: 有没有办法解释从${my.property}为@Value注释内的规划环境地政司的表达而产生,而不使用字符串转换器,例如像@Value("#{${my.property}})? 我有一个抽象工厂(简体),让我建立这是我的系统的配置的一部分,一些常见的物品。 @Component public class Factory { public Product makeVal(in

    1热度

    1回答

    当使用Spring Integration的SFTP会话工厂(使用Java配置)时,我想动态设置远程SFTP服务器目录。 Spring的文档说,这是可能的: Spring Integration SFTP Adapters 规划环境地政司和SFTP出站适配器 如同在Spring集成许多其他组件,您可以从Spring表达式语言受益 (通过指定两个属性 remote-directory-express