I Have created 1 Spring boot project in 2.1.1 version.
I am able to connect to oracle database if configuration defined on application.properties file.
but when i am trying to create multiple data base and creating a configuration file and creating data source using datasourcebuilder i am getting table or view does not exists error.
Same thing i am able to do in spring boot version 1.5.0.
Is there any configuration change in spring boot 2.1.1 or can someone provide me a sample configuration with oracle in 2.1.* version.
Welcome to the ranch
When you say create do you mean connect?
This is an example of using multiple datasources in springboot:
You do need to instantiate our DataSource beans manually in a configuration class:
Notice that the bean is anotated with @ConfigurationProperties and a config prefix is provided. Inside the method we're using a dataSourceBuilder and SpringBoot will take care of the rest.
This is what happens behind the scene:
When calling the build method on the dataSource it will call it's private bind method:
This private method performs much of the autoconfiguration magic, binding the resolved configuration to the actual DataSource instance
It's good to be able to use someting, it's better to understand how it works.
Seriously? That's what you're going with? I prefer this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java