Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <bean class="java.net.URI" id="dbUrl">
- <constructor-arg value="#{systemEnvironment['DATABASE_URL']}" />
- </bean>
- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close" lazy-init="true">
- <property name="driverClassName" value="${datasource.driverClassName}" />
- <property name="url"
- value="#{ 'jdbc:postgresql://' + @dbUrl.getHost() + ':' + @dbUrl.getPort() + @dbUrl.getPath() }" />
- <property name="username" value="#{ @dbUrl.getUserInfo().split(':')[0] }" />
- <property name="password" value="#{ @dbUrl.getUserInfo().split(':')[1] }" />
- <bean/>
- BeanInstantiationException Could not instantiate bean class java.net.URI Constructor threw exception Illegal character in fragment at index 1: #{systemEnvironment['DATABASE_URL']}
Add Comment
Please, Sign In to add comment