2

Can I use the database without the database name with JPA?

spring.datasource.url=jdbc:mariadb://localhost:3307

1 Answer 1

1

No. You will get the error "No database selected". What do you want to accomplish with this?

2
  • I wan to use different schema in the same database, without defining two different connection.
    – Alvin
    Commented Mar 12, 2019 at 13:28
  • You can declare multiple db names and then choose which to use. check here : stackoverflow.com/questions/42179442/… If you do not give us more info we cannot help you much more...
    – Filip123go
    Commented Mar 12, 2019 at 13:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.