Access the full course here: javabrains.io/courses/spring_bootquickstart
In this video, we’ll create a new project and add the necessary dependencies to use Spring Data JPA to connect to a database.
11 Comments on "Spring Boot Quick Start 27 – Adding Spring Data JPA"
Hi Want to create , different Projects for Service , Repositories , and controllerI understand for controller if we select Spring Web its enough and for Repositories I select JPA , what is required for service? only web dependency is sufficient?
amazing tutorial, I hope you will have more tutorials about Spring Boot in near future! Well done!
After downloading and adding Topic package from earlier project when I am running it, i am getting error like "Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javassist/bytecode/ClassFile". I have tried many things but I think in video there is nothing done explicitly. Please help me.
add the following dependency to your pom.xml <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> </dependency>
I dont see any topic about how to connect to external databases. Am I missing some thing.
You have fast internet and a fast machine :p
Thanks a lot Koushik for all the videos, they are really helpful, the best teacher :)There is something that I noticed. If the RestController class is not inside the same package (or subpackage) as the SpringBootApplication, then the controller is not picked by the MVC and my request to for eg. '/topics' returns me a 'not found'. I guess all RestControllers in the classpath are not picked up by the SpringBootApplication. (A complete classpath scan might not be happening)
I noticed the same too
Looking up the documentation specifies that I can specify the basepackages for the componentscan and things work fine when I do so. I realize it was the default same package + child packages that is being scanned when no basepackages are specified!
In CodeChannels.com, you can learn to code by watching videos and stay up to date with latest code shows, events and tutorials aggregated from various leading developer communities.
Copyright 2016 By CodeChannels.com All rights reserved.