Spring Boot
Spring Boot
4. Spring Initializer:- By using this we can initialize an empty spring boot project
Url:- https://start.spring.io/
5. ORM:- ORM is Object Relational Mapping:- Spring-ORM is a technique or a Design Pattern used to
access a relational database from an object-oriented language. ORM (Object Relation Mapping)
covers many persistence technologies.
6. JPA:- ( Java Persistence API): It is mainly used to persist data between Java objects and relational
databases. It acts as a bridge between object-oriented domain models and relational database
systems. It internally use Hibernate
7. Hibernate – It is a Java framework that simplifies the development of Java applications to
interact with the database.
8. Hibernate is a non-invasive framework, means it won’t force the programmers to extend
/implement any class/interface
9. DAO- Data Access Objet
10. Layers:- Service, Entities, Dao,main,Controller
11. Api-> Application Programming Interface:- It is a set of rules that allow programs to talk to each
other. The developer creates the Api on the server and allows the client to talk to it
12. REST:- Representational State Transfer
13. The important HTTP methods are
GET->It reads a resource[@GetMapping(“/ ”)]
PUT->It updates a resource[@PutMapping(“/ ”)]
POST-> It creates a new Resource[@PostMapping(“/ ”)]
DELETE->It deletes a resource[@DeleteMapping(“/ ”)]
14. HQL->Database Independent
2 SPRING BOOT COMPLETE TUTORIAL
15. @Modifiying used to get know server it is a Delete,Update Query and Must use @Transational in
service layer when the method get executed
16. SQL->Database Dependent
Select * from Student (Table name)
17. @Column- To change the column in the associated table in database
18. @Transient- This tells hibernet not to save a field in database
19. @Temporal- @Temporal over a date field tells hibernet the format in which date needs to be
saved
20. @Lob- It tells hibernet that it is a large object, not a simple object
21. @GeneratedValue(strategy=GenerationType.IDENTITY)- For Auto n+1 increment like 1,2,3,4,5,…..,n
22. @Embedebale ->To embade one table in another and have to use getter setter for this in the
embded class
23. @Onetoone->It Basically works like foreign Key, In this context @JoinColum(name=””) used to
rename joined cloum
24. @OneToOne(cascade = CascadeType.ALL) PERSIST: The persist operation is used to make a
transient instance (e.g., a new Question with a new Answer) persistent. If you save a Question
entity, JPA will also save the associated Answer entity.
25. @OneToMany-> (targetEntity = Answer.class,cascade = . )
(name = "question_id",referencedColumnName = "qid")
private List<Answer> answer;
26. @ManyToMany-> (targetEntity = Employee.class)
private List<Employee>employees; You have write in both classes
27. Fetch Type->
Lazy->Loads data only when the getter or size method called.
Eager->Loads data on the spot
28.