kawtousse
kawtousse

Reputation: 4141

spring boot and datasource generation

I'am trying to do the ORM within Spring boot in STS 4 , so I create the entities then configure the application.properties like the following:

spring.datasource.url = jdbc:mysql://localhost:3306/basebanque

spring.datasource.username = root

spring.datasource.password = 

spring.datasource.driver-class-name=com.mysql.jdbc.Driver

spring.jpa.database= MYSQL

spring.jpa.show-sql = true 

spring.jpa.hibernate.ddl-auto=create

spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5Dialect

The problem that I don't obtain any data source. the console show the following: screen shot 1

and:

enter image description here

Upvotes: 0

Views: 42

Answers (1)

Lesiak
Lesiak

Reputation: 25936

Check which entities are scanned.

https://springbootdev.com/2017/11/13/what-are-the-uses-of-entityscan-and-enablejparepositories-annotations/amp/

By default, Spring Boot will enable entity scanning and look in the package (and its subpackages) where @SpringBootApplication is located. If your configuration has entities in another package, use @EntityScan.

Upvotes: 1

Related Questions