问题:写了一个新的dao接口,进行单元测试时提示: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'maxActive'; nested exceptio
使用属性占位符可以将 Spring 配置文件中的部分元数据放在属性文件中设置,这样可以将相似的配置(如 JDBC 的参数配置)放在特定的属性文件中,如果只需要修改这部分配置,则无需修改 Spring 配置文件,修改属性文件即可.下面是一个属性占位符的示例. Spring 配置: <!-- 将配置值具体化到一个属性文件中,并且使用属性文件的key名作为占位符 --> <context:property-placeholder location="classpath:jdbc.p