Giriş
Şu satırı dahil ederiz.
Şöyle yaparız.
Şöyle yaparız.
Şu satırı dahil ederiz.
import org.springframework.boot.autoconfigure.domain.EntityScan;The @EntityScan does not create beans. It only identifies which classes should be used by a specific persistence context. Since Spring boot 1.4 that includes JPA, MongoDB, neo4j, Casscandra and CouchBase.Örnek
Şöyle yaparız.
@ComponentScan("org.example.base")
@EntityScan("org.example.base.entities")
public class MyConfig {
}Şöyle yaparız.
@SpringBootApplication
@EntityScan("a.b.c")
public class Main {
...
}
basePackages Alanı
Şöyle yaparız.
Şöyle yaparız.
@EntityScan(basePackages = {"edu.miis.Entities"})spring.jpa.properties.hibernate.archive.autodetection=class 
Hiç yorum yok:
Yorum Gönder