Skip to main content

Posts

Showing posts with the label lombok

Spring Boot With H2 Database

 h2 database spring boot For explanation watch video: Directory Structure pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.6</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.app</groupId> <artifactId>SpringBootH2DB</artifactId> <version>0.0.1-SNAPSHOT</version> <name>SpringBootH2DB</name> <description>Demo project for Spring Boot</description> <properties> <java.v

spring boot project | spring boot crud web application | Spring Boot Simple Project

 spring boot crud web application for Explanation watch video Directory Structure pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.3</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.app</groupId> <artifactId>SpringBootCrud</artifactId> <version>0.0.1-SNAPSHOT</version> <name>SpringBootCrud</name> <description>Demo project for Spring Boot</description> <properties> &l

Custom Queries with Spring Data JPA’s @Query Annotation

 Custom Queries with Spring Data JPA’s @Query Annotation For explanation watch video : Directory Structure :: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.4</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.app</groupId> <artifactId>SpringBootDataJPASelect</artifactId> <version>0.0.1-SNAPSHOT</version> <name>SpringBootDataJPASelect</name> <description>Demo project for Spring Boot&

Collection Mapping Spring Data Jpa | JPA Collection Mapping

 Collection Mapping Spring Data Jpa For Explanation Watch Video: Directory Structure application.properties #datasource spring.datasource.url=jdbc:mysql://localhost:3306/new spring.datasource.username=root spring.datasource.password=root #jpa spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true SpringBootDataJpaCollectionMappingApplication  package com.app; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootDataJpaCollectionMappingApplication { public static void main(String[] args) { SpringApplication.run(SpringBootDataJpaCollectionMappingApplication.class, args); } } Employee  package com.app.entity; import java.util.List; import java.util.Map; import java.util.Set; import javax.persistence.CollectionTable; import javax.persistence.Column; import javax.persistence.ElementCollection; import jav