Spring Boot for JPA support -


i found adding properties scanbasepackages on @springbootapplication can not enable feature of jpa on @enity , jparepository. have add @enablejparepositories , @entityscan , basepackages properties on them. there simpler solution on this? thank you

just go spring initializr site, specify 'group' , 'artifact' (or live default ones), in 'dependencies' block choose "jpa" , "h2" (or db need - see 'switch full version' link), click 'generate project'.

in downloaded archive can find spring boot skeleton project jpa support.

enter image description here

if project pom.xml file can see these dependencies:

<dependencies>      <!-- jpa -->     <dependency>         <groupid>org.springframework.boot</groupid>         <artifactid>spring-boot-starter-data-jpa</artifactid>     </dependency>      <!-- h2 db -->      <dependency>         <groupid>com.h2database</groupid>         <artifactid>h2</artifactid>     </dependency>      <!-- other suff --> </dependencies> 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -