• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Table or view does not exist  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 1170
18
Firefox Browser Hibernate IntelliJ IDE Java MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the ranch
When you say create do you mean connect?
This is an example of using multiple datasources in springboot:

application.properties:


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
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!