1

I am trying to configure appliaction.properties file in my spring application.

Inside my spring-servlet.xml I have

 <context:property-placeholder location="classpath:application.properties" />

 <bean id="datasource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close" p:driverClass="${jdbc.driverClassName}"
p:jdbcUrl="${jdbc.url}" p:user="${jdbc.username}" p:password="${jdbc.password}"
p:acquireIncrement="10" 
p:idleConnectionTestPeriod="60"
p:maxPoolSize="100" 
p:maxStatements="0" 
p:minPoolSize="10" 
p:initialPoolSize="10" />

My application.properties file is inside my src folder but its not reading values from my appliaction.properties file. Do I am missing anything in configuration?

If I directly put database values then it works fine no there is no connection problem

Please let me know if anything else is required.

4

0 回答 0