<bean id="investorQueryConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  <property name="order" value="1" />
  <property name="ignoreUnresolvablePlaceholders" value="true" />
  <property name="locations">
    <list>
      <value>classpath:properties/sga.properties</value>
      <value>classpath:properties/jdbc.properties</value>
      <value>classpath:properties/redis-cache.properties</value>
    </list>
  </property>
</bean>

通过这个类,您可以将一些组态设定,移出至.properties文件中,而.properties文件可以作为客户根据需求,自定义一些相关的参数。

此配置放在spring_config.xml配置最上,下面的配置就可以用<property name="username" value="${jdbc.username}" />这种形式。

将值可能经常会要变动,有时客户需求需要改变,可以透过jdbc.properties来简单的设定,而这个信息已设定在location属性中。

如果有多个.properties文件,则可以透过  locations   属性来设定。

org.springframework.beans.factory.config.PropertyPlaceholderConfigurer类的更多相关文章

  1. org.springframework.beans.factory.config.PropertyPlaceholderConfigurer的systemPropertiesModeName属性

    转自:https://www.cnblogs.com/huqianliang/p/5673701.html 使用PropertyPlaceholderConfigurer类载入外部配置 在Spring ...

  2. org.springframework.beans.factory.config.MethodInvokingFactoryBean的使用

    它有两种用法:一个是调用类的静态方法,一个是调用已在IOC容器中的bean的方法.调用结果也分两种,一种是有返回,那么也会作为bean注册到IOC容器中,另一种是没有返回值,那么实际上就是为了在启动时 ...

  3. 解决 java.lang.ClassNotFoundException: org.springframework.beans.factory.config.EmbeddedValueResolver

    1.今天用maven配置了一下dubbo的项目发现启动项目后意外报错: java.lang.ClassNotFoundException: org.springframework.beans.fact ...

  4. java.lang.NoSuchMethodError: org.springframework.beans.factory.config.ConfigurableBeanFactory.getSingletonMutex()Ljava/lang/Object

    © 版权声明:本文为博主原创文章,转载请注明出处 1.问题描述 搭建SSH框架,没有添加事务时一切正常,最后添加完事务后报错,并且怎么弄都是一样.报错信息如下: 警告: Exception encou ...

  5. Exception in thread "main" java.lang.NoClassDefFoundError:org/springframework/beans/factory/config/EmbeddedValueResoler

    参考自:https://www.cnblogs.com/quanbin/p/11100337.html 解决方法:检查发现spring的核心包spring-bean版本和其他核心包版本不同,更改为和其 ...

  6. NoSuchMethodError: org.springframework.beans.factory.config.BeanDefinition.getResolvableType

    spring整合Mybatis报错: 解决方法: 检查maven依赖中的spring-jdbc和spring-webmvc是否版本一致 以下均为5.2.0.RELEASE版本 除此之外再检查是否有其他 ...

  7. org.springframework.beans.factory.BeanDefinitionStoreException

    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'd ...

  8. org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSessionRepositoryFilter' is defined

    spring-session 集成redis,web.xml配置filter时候出现  No bean named 'springSessionRepositoryFilter' is defined ...

  9. Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException

    1.错误描写叙述 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -he ...

随机推荐

  1. Tuning SQL 11

    这一章还是概述性的说明 优化器 现在都是在用 Cost-based 这种调优器 注意这本书的作者是个大牛, 他就是说 DBA OVER 那个人, Jonathan Lewis hint 是人告诉SQL ...

  2. javascript获取html标记的的绝对定位值

    function getElementLeft(element) { var actualLeft = element.offsetLeft; var current = element.offset ...

  3. WebAPI发布IIS报错问题

    1.看IIS中处理程序映射中有没有注册:ExtensionlessUrlHandler-Integrated-4.0 没有的话需要在[运行]中注册:aspnet_regiis.exe 2.配置文件中要 ...

  4. 【转】node.exe调试JavaScript代码

    node.exe调试JavaScript代码 目的: Console.log可以打印一些信息,光有log还不够,当程序出现问题时通过log可以定位到错误位置,但是当我们想查看错误现场的变量时,log就 ...

  5. Jmeter JDBC执行多条SQL

    今天在编写自动化回归脚本的时候,需要在jmeter的jdbc请求中执行多条sql,在百度里搜索了一些文章,按照网上提供的步骤,发现不起作用,后来发现是作者的截图误导了,为了让后面的同学少走弯路,这里我 ...

  6. Servlet及相关类和接口

    上一篇介绍了在Web项目中web.xml文件的配置信息,本篇主要介绍里面非常重要的配置——Servlet配置,重点介绍与Servlet相关的几个接口和类,包括Servlet接口.ServletConf ...

  7. CentOS firewalld 防火墙操作

    Centos 7 开启端口CentOS 7 默认没有使用iptables,所以通过编辑iptables的配置文件来开启80端口是不可以的 CentOS 7 采用了 firewalld 防火墙 如要查询 ...

  8. android应用安全——组件通信安全(Intent)

    这里主要涉及到了Activity.Content Provider.Service.Broadcast Receiver等.这些如果在Androidmanifest.xml配置不当,会被其他应用调用, ...

  9. [Algorithms] Radix Sort

    Radix sort is another linear time sorting algorithm. It sorts (using another sorting subroutine) the ...

  10. 160623、理解 Promise 的工作原理

    Javascript 采用回调函数(callback)来处理异步编程.从同步编程到异步回调编程有一个适应的过程,但是如果出现多层回调嵌套,也就是我们常说的厄运的回调金字塔(Pyramid of Doo ...