Careeroza
Real World Example
ShopEase: The Project Used in This Course
All Java full stack materials on Careeroza (Spring Boot, Hibernate & JPA, Spring Security, Microservices) build the same e-commerce app, ShopEase. In this level you will map its core tables:
| Entity | Fields (basic level) | Table |
|---|---|---|
Product | id, name, description, price, stock, category, status | products |
Category | id, name, slug | categories |
User | id, email, fullName, role, address (embedded) | users |
Order | id, orderNumber, status, totalAmount, shippingAddress, placedAt | orders |
OrderItem, CartItem | id, productId, quantity, unitPrice | order_items, cart_items |
Note: In the basic level, Product.category is a simple text column. Real relationships (@ManyToOne Category, @OneToMany order items) are covered in the medium level.
A Flipkart-Style Product Page, End to End
Browser: GET /api/products/42
|
ProductController -> ProductService -> ProductRepository.findById(42)
|
Spring Data JPA -> EntityManager.find(Product.class, 42)
|
Hibernate: select ... from products p where p.id=?
|
JDBC + HikariCP -> MySQL
<- JSON {"id":42,"name":"Boat Rockerz 450","price":1499.00,...}@Entity
@Table(name = "products")
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private BigDecimal price;
private Integer stock;
// getters and setters
}
public interface ProductRepository extends JpaRepository<Product, Long> { }
@Service
public class ProductService {
private final ProductRepository repo;
public ProductService(ProductRepository repo) { this.repo = repo; }
public Product getProduct(Long id) {
return repo.findById(id).orElseThrow(() -> new ProductNotFoundException(id));
}
}By the end of this level you will understand every line of this code and what Hibernate does under it.