- Entities act as Wrapper classes to our database tables
- Create a sub package under current package and name it as Entities.
- Create a new class with Entity Name
- This is basically the name of your Table such as Person,Department etc
- Annotate the class with @Entity from javax.persistance.
- Annotate with @Table annotation to add table name.
- This annotation is not mandatory(by default creates a table with class name)
- Create Primary key data variable and annotate with @ID,@Column(name="column name")
- Add more data members which will act as columns of database.
- Annotate these with @Column(name="columnname")
- Generate getters and setters.
- Add empty constructor and non empty constructor.
- Add Data Access Object(DAO) classes or Repository Classes for entities.
- We can create a separate package for these.
- Add Session Data variable from Org.Hibernate.Session.
- Add a Constructor which takes Session Factory as parameter.
- Open session in this constructor using Session Factory and assign to data variable Session.
- All the CRUD operations performed will be a part of this class.
- Annotations
- Controllers
- Components
- Dependencies
- Documenting Java Code
- Entities
- Hibernate
- HTTPS Security
- Spring Core
- Maven
- Spring MVC
- Microservices
- Packages
- Project Configuration
- REST Templates
- Spring Boot
- AOP
- Spring DI
- Spring IOC
- Spring Data
- Tag Library
- View Resolvers
- Validations,Errors & Exceptions
- Activiti Framework
- Deploy spring boot Microservices in Fargate
- Spring Security
- Password encryption using Jasypt
- Flyway DB Migration Script
- Session in Spring Boot
- Spring Expression Language
- Spring JDBC
- Spring ORM
- Testing Spring Boot
- Correlation ID
- Logging
- ELK Stack
- EFK Stack
- Swagger
- Rabbit MQ
- Circuit Breaker Pattern
- Connection Pooling
- Spring Batch
- Zipkins
- Kafka
- Spring Boot Actuator
- Spring Cloud
- Caching
- Gateway
- Service Discovery
Entities
Subscribe to:
Posts (Atom)
Spring Boot
What is circular/cyclic dependency in spring boot? When two services are interdependent on each other, that is to start one service, we requ...
-
What is JPA? JPA Is also called as Java persistence API It is a standard form oracle to map object to database relations. Provides specific...
-
Technology's / frameworks in Spring Spring core Spring MVC Spring boot Spring data Hibernate
-
Q What is the minimal web version required to use JSTL? And : 2.4 For example following tag from web.xml uses web 4.0 <web-app xmlns:xs...
No comments:
Post a Comment