3
jdbc.init无法解析
source link: https://www.oschina.net/question/4585772_2324019
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
jdbc.init无法解析
cainiao001 发布于 昨天 10:59
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [spring-dao.xml]: Could not resolve placeholder 'jdbc.init' in value "${jdbc.init}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'jdbc.init' in value "${jdbc.init}"
网上的解决办法是:导入mybatis依赖,这个之前就导过了,又说降版本,降版本后,还是没有解决,最新版本也是没有解决,这个问题
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <!--关联数据库配置文件--> <!--读取jdbc.properties配置文件参数化--> <context:property-placeholder location="classpath:jdbc.properties"/> <!--连接池--> <!--集成Druid连接池--> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"> <!--基本配置--> <property name="driverClassName" value="${jdbc.driver}"/> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> <!--配置初始化大小,最大,最小--> <property name="initialSize" value="${jdbc.init}"/> <property name="minIdle" value="${jdbc.minIdle}"/> <property name="maxActive" value="${jdbc.maxActive}"/>
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK