{"id":17350320,"url":"https://github.com/codecshekhar/electra-spring-boot-hibernate-jpa","last_synced_at":"2026-04-14T00:02:04.088Z","repository":{"id":257826366,"uuid":"860893123","full_name":"CodeCshekhar/electra-spring-boot-hibernate-jpa","owner":"CodeCshekhar","description":"This repository contains spring-boot-hibernate-jpa concepts of my project to illustrate its advantages ","archived":false,"fork":false,"pushed_at":"2024-11-13T05:56:27.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T11:39:45.498Z","etag":null,"topics":["caching","hibernate-jpa","javax-persistence","lombok","mysql-database","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeCshekhar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T12:57:45.000Z","updated_at":"2024-12-02T11:47:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"693be9e3-c2aa-413f-ad2e-54fe5e34b464","html_url":"https://github.com/CodeCshekhar/electra-spring-boot-hibernate-jpa","commit_stats":{"total_commits":109,"total_committers":1,"mean_commits":109.0,"dds":0.0,"last_synced_commit":"e634abe6019682b8849dcafc40b95c9e9ba57323"},"previous_names":["codecshekhar/electra-spring-boot-hibernate-jpa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CodeCshekhar/electra-spring-boot-hibernate-jpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeCshekhar%2Felectra-spring-boot-hibernate-jpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeCshekhar%2Felectra-spring-boot-hibernate-jpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeCshekhar%2Felectra-spring-boot-hibernate-jpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeCshekhar%2Felectra-spring-boot-hibernate-jpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeCshekhar","download_url":"https://codeload.github.com/CodeCshekhar/electra-spring-boot-hibernate-jpa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeCshekhar%2Felectra-spring-boot-hibernate-jpa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31776013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["caching","hibernate-jpa","javax-persistence","lombok","mysql-database","spring-boot"],"created_at":"2024-10-15T17:06:30.741Z","updated_at":"2026-04-14T00:02:04.048Z","avatar_url":"https://github.com/CodeCshekhar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Electea Spring Boot Hibernate JPA Project\n\nThis project demonstrates the use of Spring Boot with Hibernate JPA, Lombok, and MySQL . It also includes information about using H2 database as an alternative database.\n\n## Table of Contents\n- [Technologies Used](#technologies-used)\n- [Project Setup](#project-setup)\n- [Configuration](#configuration)\n- [Running the Application](#running-the-application)\n- [H2 Database](#h2-database)\n- [Using MySQL](#using-mysql)\n- [Lombok](#lombok)\n\n## Technologies Used\n- Spring Boot\n- Hibernate JPA\n- Lombok\n- MySQL \n- H2 database (optional)\n\n## Project Setup\n1. Ensure you have Java JDK 11 or later installed.\n2. Clone this repository: `git clone https://github.com/yourusername/electra-spring-boot-hibernate-jpa.git`\n3. Navigate to the project directory: `cd electra-spring-boot-hibernate-jpa`\n4. Build the project: `./mvnw clean install` (or `mvnw clean install` on Windows)\n\n## Using MySQL\nTo use MySQL instead of H2, follow these steps:\n\n1. Add the MySQL dependency to your `pom.xml`:\n   ```xml\n   \u003cdependency\u003e\n       \u003cgroupId\u003emysql\u003c/groupId\u003e\n       \u003cartifactId\u003emysql-connector-java\u003c/artifactId\u003e\n       \u003cscope\u003eruntime\u003c/scope\u003e\n   \u003c/dependency\u003e\n   ```\n\n2. Update `application.properties`:\n   ```properties\n   spring.datasource.url=jdbc:mysql://localhost:3306/your_database_name\n   spring.datasource.username=your_username\n   spring.datasource.password=your_password\n   spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\n   spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect\n   ```\n\n3. Create the MySQL database:\n   ```sql\n   CREATE DATABASE your_database_name;\n   ```\n\n4. Restart your application.\n\n\n## Using H2 Database\nThe project uses `application.properties` for configuration. Here's a sample configuration:\n\n```properties\n# H2 Database Configuration\nspring.datasource.url=jdbc:h2:mem:testdb\nspring.datasource.driverClassName=org.h2.Driver\nspring.datasource.username=sa\nspring.datasource.password=password\nspring.jpa.database-platform=org.hibernate.dialect.H2Dialect\n\n# Hibernate Configuration\nspring.jpa.hibernate.ddl-auto=update\nspring.jpa.show-sql=true\n\n# H2 Console Configuration\nspring.h2.console.enabled=true\nspring.h2.console.path=/h2-console\n```\n\n## Running the Application\nTo run the application, use the following command:\n\n```\n./mvnw spring-boot:run\n```\n\nThe application will start on `http://localhost:8080`.\n\nThis project uses H2 as the default in-memory database. You can access the H2 console at `http://localhost:8080/h2-console`. Use the following details to log in:\n- JDBC URL: `jdbc:h2:mem:testdb`\n- Username: `sa`\n- Password: `password`\n\n## Lombok\nThis project uses Lombok to reduce boilerplate code. Ensure your IDE has Lombok plugin installed for proper support.\n\nTo use Lombok in your entities:\n\n```java\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\nimport lombok.AllArgsConstructor;\n\n@Data\n@NoArgsConstructor\n@AllArgsConstructor\n@Entity\npublic class YourEntity {\n    @Id\n    @GeneratedValue(strategy = GenerationType.IDENTITY)\n    private Long id;\n    \n    private String name;\n    // Other fields...\n}\n```\n\nThis setup allows you to use Lombok annotations like `@Data`, `@NoArgsConstructor`, and `@AllArgsConstructor` to automatically generate getters, setters, constructors, and other common methods.\n\nFor more information on Lombok, visit [Project Lombok](https://projectlombok.org/).\n\n## Contributors\n\nThanks to the following people who have contributed to this project:\n\n* [@Chandrashekharwagh](https://github.com/Chandrashekharwagh) 📖\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecshekhar%2Felectra-spring-boot-hibernate-jpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecshekhar%2Felectra-spring-boot-hibernate-jpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecshekhar%2Felectra-spring-boot-hibernate-jpa/lists"}