I have a context file which contains a JNDI datasource information as follows
<Context>
<Resource name="jdbc/myapp" auth="${auth.myapp}" type="javax.sql.DataSource"
maxActive="${maxActive.myapp}"
maxIdle="${maxIdle.myapp}"
maxWait="${maxWait.myapp}"
username="${username.myapp}"
password="${password.myapp}"
driverClassName="${driverClassName.myapp}"
url="${url.myapp}"
validationQuery="${validationQuery.myapp}"
factory="com.myapp.MyDataSourceFactory"/>
</Context>
I have multiple datasource resource similar to the above. I am migrationg my spring MVC application to spring-boot. But my application is not recognizing this context file.
I am using org.springframework.boot:spring-boot-starter-web:jar:1.4.0.RELEASE
How to configure my spring-boot application to use this context file? Now I am getting the following error
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial