{"id":14972374,"url":"https://github.com/celalaygar/spring-boot-2-3","last_synced_at":"2025-08-20T06:33:25.849Z","repository":{"id":37277249,"uuid":"132289863","full_name":"celalaygar/Spring-Boot-2-3","owner":"celalaygar","description":"Spring boot 2 - 3 türkçe örnekler","archived":false,"fork":false,"pushed_at":"2024-12-15T18:44:42.000Z","size":2019,"stargazers_count":40,"open_issues_count":5,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-15T19:36:41.353Z","etag":null,"topics":["bootstrap-4","h2","hibernate","jpa","jsp","kafka","mongodb","postgresql","rabbitmq","restful","spring-boot","spring-boot-2","spring-data","spring-data-jpa","spring-mvc","spring-security","springboot","springboot2","thymeleaf"],"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/celalaygar.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":"2018-05-05T22:43:07.000Z","updated_at":"2024-12-15T18:43:05.000Z","dependencies_parsed_at":"2024-12-04T12:34:56.640Z","dependency_job_id":null,"html_url":"https://github.com/celalaygar/Spring-Boot-2-3","commit_stats":{"total_commits":499,"total_committers":2,"mean_commits":249.5,"dds":0.002004008016032066,"last_synced_commit":"4be2fc74f75da96b3922cd5098ee32c6ac92f6c2"},"previous_names":["celalaygar/spring-boot-2-3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celalaygar%2FSpring-Boot-2-3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celalaygar%2FSpring-Boot-2-3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celalaygar%2FSpring-Boot-2-3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/celalaygar%2FSpring-Boot-2-3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/celalaygar","download_url":"https://codeload.github.com/celalaygar/Spring-Boot-2-3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230400616,"owners_count":18219831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bootstrap-4","h2","hibernate","jpa","jsp","kafka","mongodb","postgresql","rabbitmq","restful","spring-boot","spring-boot-2","spring-data","spring-data-jpa","spring-mvc","spring-security","springboot","springboot2","thymeleaf"],"created_at":"2024-09-24T13:46:49.335Z","updated_at":"2025-08-20T06:33:25.830Z","avatar_url":"https://github.com/celalaygar.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot Projects Collection\n\nThis repository contains a collection of 32 small example projects built primarily with Spring Boot, showcasing various functionalities, integrations, and best practices. Each project is designed to demonstrate a specific concept or technology, providing a clear and concise example.\n\n---\n\n### General Information\n\n-   **Port Number Configuration**: To change the default port number for any Spring Boot application, you can modify the `server.port` property in the `application.properties` file located in `src/main/resources/application.properties`. For example:\n    ```properties\n    server.port=8182\n    ```\n-   **Database Schema Generation**: For projects utilizing JPA and Hibernate, you can configure automatic database table generation by setting `spring.jpa.hibernate.ddl-auto` in `application.properties`.\n    -   `create`: Tables will be created from scratch every time the application starts.\n    -   `update`: Existing tables will be updated, and new tables will be created if they don't exist, preserving existing data. It's recommended to use `update` for persistence after initial setup.\n\n##### Useful References for Spring Technologies:\n\n``` \nhttps://docs.spring.io/spring-data/jpa/docs/current/reference/html/\nhttps://www.logicbig.com/ \nhttps://howtodoinjava.com/\nhttps://o7planning.org/\nhttps://www.concretepage.com/spring-boot/\nhttps://memorynotfound.com/\nhttps://www.dineshonjava.com/\n```\n\n\n### Project Descriptions\n\n#### 1 - `spring-boot-HelloWorld`\n-   **Description**: A foundational \"Hello World\" example demonstrating the absolute basics of setting up and running a Spring Boot application.\n-   **Technologies**: Spring Boot.\n-   **Database**: PostgreSQL (default).\n-   **Links**: `http://localhost:3092/`, `http://localhost:3092/welcome`\n\n#### 2 - `spring-boot-view-JSP-File-1`\n-   **Description**: Demonstrates how to integrate and render JavaServer Pages (JSP) as view templates within a Spring Boot application.\n-   **Technologies**: Spring Boot, JSP.\n-   **Database**: PostgreSQL (default).\n-   **Links**: `http://localhost:8182/`, `http://localhost:8182/personels`\n\n#### 3 - `spring-boot-view-Error-Page`\n-   **Description**: Shows how to implement custom error pages (e.g., 404, 403) in a Spring Boot application by placing HTML files in `src/main/resources/public/error/`.\n-   **Technologies**: Spring Boot, HTML.\n-   **Database**: PostgreSQL (default).\n-   **Usage**: Accessing non-existent paths like `http://localhost:8182/deneme` will display the custom error page.\n\n#### 4 - `springboot-(REST_API_QUERY)`\n-   **Description**: A static REST API example demonstrating basic HTTP methods (GET, POST, PUT, DELETE) for CRUD operations. Includes JUnit tests for API interaction.\n-   **Technologies**: Spring Boot, REST API, JUnit.\n-   **Database**: PostgreSQL (default).\n-   **Usage**: Run `PersonelClinicRestControllerTest.java` for testing. Data changes can be observed at `localhost:8182/rest/personels`.\n\n#### 5 - `springboot-with-h2-database(REST_API_QUERY)`\n-   **Description**: Demonstrates using JDBC with an in-memory H2 database. Includes examples of creating schemas, tables, and inserting data using `data.sql` and `schema.sql`.\n-   **Technologies**: Spring Boot, JDBC, H2 Database, REST API.\n-   **Database**: H2.\n-   **Usage**: Examine `src/main/resources/data.sql` \u0026 `schema.sql`. Run `createPersonelTest`, `deletePersonelTest` in `PersonelClinicRestControllerTest.java`.\n\n#### 6 - `springboot-jpa-with-h2-database (REST_API_QUERY)`\n-   **Description**: Illustrates the integration of JPA (Java Persistence API) with an H2 in-memory database for data persistence. Focuses on core JPA annotations like `@Transactional`, `@Id`, `@GeneratedValue`, `@Entity`, `@Table`, and `@Column`.\n-   **Technologies**: Spring Boot, JPA, H2 Database, REST API.\n-   **Database**: H2.\n\n#### 7 - `springboot-simple-security-example`\n-   **Description**: A basic Spring Security example showcasing login, logout, custom login pages, and \"remember me\" functionality with static user credentials defined in `application.properties`.\n-   **Technologies**: Spring Boot, Spring Security.\n-   **Database**: PostgreSQL (default).\n-   **Configuration**: User credentials can be changed in `application.properties`.\n\n#### 8 - `SpringJPA-PostgreSQL-Example`\n-   **Description**: Demonstrates basic CRUD (Create, Read, Update, Delete) operations using JPA with a PostgreSQL database. Includes instructions for setting up the `customer` table in pgAdmin 4.\n-   **Technologies**: Spring Boot, JPA, PostgreSQL.\n-   **Database**: PostgreSQL.\n-   **Usage**: First, `localhost:8182/save` to insert data, then `localhost:8182/findall`, `localhost:8182/findbyid?id=3`, `localhost:8182/findbylastname?lastname=Terim`.\n\n#### 9 - `springboot-security-with-h2-example`\n-   **Description**: An example of role-based authorization using Spring Security with an H2 database. Different roles (ROLE_EDITOR, ROLE_ADMIN, ROLE_USER) have varying access levels to specific endpoints. Shows both plaintext and bcrypt-encrypted passwords.\n-   **Technologies**: Spring Boot, Spring Security, H2 Database, Role-Based Authorization, Bcrypt.\n-   **Database**: H2.\n-   **Configuration**: User roles and passwords are defined in `src/main/resources/data.sql`. Includes a `PasswordEncoderTest.java` for generating encrypted passwords.\n\n#### 10 - `Spring-Boot-10-JPA-PostgreSQL-CRUD-RESTful Services-And-Jsp`\n-   **Description**: Combines JPA, PostgreSQL, RESTful services, and JSP for a comprehensive CRUD application. Provides both REST endpoints and JSP views for managing data.\n-   **Technologies**: Spring Boot, JPA, PostgreSQL, REST API, JSP.\n-   **Database**: PostgreSQL.\n-   **Usage**: `localhost:8182/`, `localhost:8182/customers`, `localhost:8182/customer/1`, `localhost:8182/rest/customers`, `localhost:8182/rest/customer/1`.\n\n#### 11 - `Spring-Boot-11-SpringData-1-JPA-PostgreSQL`\n-   **Description**: Focuses on advanced JPA mappings, specifically `@OneToOne` relationships, `@JoinColumn`, and `@JsonIgnore` annotations, demonstrating data handling across multiple tables in PostgreSQL.\n-   **Technologies**: Spring Boot, Spring Data JPA, PostgreSQL, `@OneToOne`, `@JoinColumn`, `@JsonIgnore`.\n-   **Database**: PostgreSQL.\n-   **Usage**: `localhost:8182/insert` to populate data. Then `localhost:8182/details`, `localhost:8182/customers`, `localhost:8182/customer/{id}`, `localhost:8182/customerjson/{id}`.\n\n#### 12 - `Spring-Boot-12-SpringData-2-JPA-PostgreSQL`\n-   **Description**: Explores `@ManyToOne` relationships in Spring Data JPA with PostgreSQL, along with the use of `@Query` annotation for custom SQL queries.\n-   **Technologies**: Spring Boot, Spring Data JPA, PostgreSQL, `@ManyToOne`, `@Query`.\n-   **Database**: PostgreSQL.\n-   **Usage**: `localhost:8182/insert` to populate data. Then `localhost:8182/books`, `localhost:8182/book/{id}`, `localhost:8182/customers`, `localhost:8182/customer/{id}`.\n\n#### 13 - `Spring-Boot-13-SpringData-3-JPA-Hibernate-PostgreSQL`\n-   **Description**: Demonstrates the use of `@Embeddable` and `@Embedded` annotations in Spring Data JPA with Hibernate and PostgreSQL, for embedding complex types within entities.\n-   **Technologies**: Spring Boot, Spring Data JPA, Hibernate, PostgreSQL, `@Embeddable`, `@Embedded`.\n-   **Database**: PostgreSQL.\n-   **Usage**: `localhost:8182/insert_car` to insert data. REST operations via Postman (`localhost:8182/car` for POST, `localhost:8182/car/{id}` for PUT/DELETE). Browser links: `localhost:8182/car1/{id}`, `localhost:8182/car2/{id}`, `localhost:8182/car_with_name/{name}`, `localhost:8182/car_with_model/{model}`.\n\n#### 14 - `Spring-Boot-14-SpringData-4-Thymeleaf-JPA-PostgreSQL`\n-   **Description**: Integrates Thymeleaf with Spring Data JPA and PostgreSQL, showcasing `@OneToMany` and `@ManyToOne` relationships in a web application.\n-   **Technologies**: Spring Boot, Spring Data JPA, Thymeleaf, PostgreSQL, `@OneToMany`, `@ManyToOne`.\n-   **Database**: PostgreSQL.\n-   **Usage**: `localhost:8182/rest/insert` to populate data. Then `localhost:8182/customers`, `localhost:8182/rest/customers`, `localhost:8182/rest/cust`.\n\n#### 15 - `Spring-Boot-15-SpringSecurity-(Simple)-JPA-PostgreSQL`\n-   **Description**: A simple Spring Security example with JPA and PostgreSQL, demonstrating role-based access control using `@Secured` annotation and static user credentials defined in `webConfigurationClass.java`.\n-   **Technologies**: Spring Boot, Spring Security, JPA, PostgreSQL, `@Secured`.\n-   **Database**: PostgreSQL.\n-   **User Credentials**:\n    -   `admin / admin / ADMIN`\n    -   `celal / celal / USER`\n    -   `arda / arda / EDITOR`\n-   **Access Links**:\n    -   `PermitAll`: `localhost:8182/userinfo/`\n    -   `ADMIN`: `localhost:8182/rest/customers/`\n    -   `USER`: `localhost:8182/rest/customers/`, `localhost:8182/rest/customer-by-email/{email}/`, `localhost:8182/customer/{email}/`, `localhost:8182/rest/customerbyname/{name}`\n    -   `EDITOR`: `localhost:8182/rest/cust/`, `localhost:8182/rest/customer-by-name/{name}/`\n\n#### 16 - `Spring-Boot-16-SpringData-5-Thymeleaf-JPA-PostgreSQL`\n-   **Description**: Focuses on `@ManyToMany` relationships and `@JoinTable` annotation in Spring Data JPA with Thymeleaf and PostgreSQL, demonstrating how to handle many-to-many associations between entities.\n-   **Technologies**: Spring Boot, Spring Data JPA, Thymeleaf, PostgreSQL, `@ManyToMany`, `@JoinTable`.\n-   **Database**: PostgreSQL.\n\n#### 17 - `Spring-Boot-17-SpringSecurity-Jpa-PostgreSQL`\n-   **Description**: A comprehensive example of user registration and login functionality using Spring Security with JPA and PostgreSQL. Includes a video demonstration.\n-   **Technologies**: Spring Boot, Spring Security, JPA, Hibernate, PostgreSQL, Thymeleaf, Bootstrap.\n-   **Database**: PostgreSQL.\n-   **Video**: [![Watch the video](https://img.youtube.com/vi/VAG2s3j5L3E/hqdefault.jpg)](https://www.youtube.com/watch?v=VAG2s3j5L3E\u0026feature=youtu.be)\n\n#### 18 - `Spring-Boot-18-Mongodb`\n-   **Description**: Demonstrates how to integrate and use MongoDB as the NoSQL database for a Spring Boot application. Covers basic CRUD operations with MongoDB.\n-   **Technologies**: Spring Boot, MongoDB.\n-   **Database**: MongoDB.\n\n#### 19 - `Spring-Boot-19-RabbitMQ`\n-   **Description**: An example showcasing message queuing with RabbitMQ in a Spring Boot application. Demonstrates producer and consumer patterns for asynchronous communication.\n-   **Technologies**: Spring Boot, RabbitMQ.\n-   **Database**: PostgreSQL (default).\n\n#### 20 - `Spring-Boot-20-React-JWT-without-Redux`\n-   **Description**: A full-stack application demonstrating JWT (JSON Web Token) based authentication with a Spring Boot backend and a React.js frontend, without using Redux for state management.\n-   **Technologies**: Spring Boot, React.js, JWT, REST API.\n-   **Database**: PostgreSQL (default).\n\n#### 21 - `Spring-Boot-21-React-JWT-with-Redux`\n-   **Description**: A full-stack application similar to project 20, but integrating Redux for centralized state management in the React.js frontend, along with JWT authentication and a Spring Boot backend.\n-   **Technologies**: Spring Boot, React.js, Redux, JWT, REST API.\n-   **Database**: PostgreSQL (default).\n\n#### 22 - `Spring-Boot-22-Role-Based-JWT`\n-   **Description**: Extends JWT authentication to implement role-based access control. Demonstrates how to issue and validate JWTs with user roles, and secure endpoints based on those roles.\n-   **Technologies**: Spring Boot, JWT, Role-Based Security, REST API.\n-   **Database**: PostgreSQL (default).\n\n#### 23 - `Spring-Boot-23-Base-Model-Inheritance`\n-   **Description**: Illustrates the concept of base model inheritance in JPA with PostgreSQL, specifically using `@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)` to manage common fields across multiple entities.\n-   **Technologies**: Spring Boot, JPA, PostgreSQL, Inheritance.\n-   **Database**: PostgreSQL.\n-   **Reference**: See `Transaction.java` for an example of the inheritance strategy.\n\n#### 24 - `Spring-Boot-24-Unit-Test`\n-   **Description**: Provides examples of writing unit tests for Spring Boot applications, covering various components like services, repositories, and controllers, using JUnit and Mockito.\n-   **Technologies**: Spring Boot, JUnit, Mockito.\n-   **Database**: PostgreSQL (default).\n\n#### 25 - `Spring-Boot-25-Elastic-Search`\n-   **Description**: Demonstrates integration of Elastic Search with a Spring Boot application for powerful full-text search and analytical capabilities.\n-   **Technologies**: Spring Boot, Elastic Search.\n-   **Database**: PostgreSQL (default, for primary data if any).\n\n#### 26 - `Spring-Boot-26-Kafka-Producer-Consuöer-Scheduled`\n-   **Description**: Showcases the implementation of Kafka producers and consumers in Spring Boot for real-time data streaming, along with scheduled tasks for automated operations.\n-   **Technologies**: Spring Boot, Apache Kafka, Scheduled Tasks.\n-   **Database**: PostgreSQL (default).\n\n#### 27 - `Spring-Boot-27-PostgreSQL-Trigger-Java-Listener`\n-   **Description**: Explores advanced PostgreSQL features by demonstrating how to create and use database triggers, and how to listen for these trigger events from a Java Spring Boot application.\n-   **Technologies**: Spring Boot, PostgreSQL, Database Triggers, Java Listeners.\n-   **Database**: PostgreSQL.\n\n#### 28 - `Spring-Boot-28-ReactJS-WebSocket`\n-   **Description**: A real-time communication example using WebSockets with a Spring Boot backend and a React.js frontend. Ideal for chat applications or live data updates.\n-   **Technologies**: Spring Boot, React.js, WebSockets.\n-   **Database**: PostgreSQL (default).\n\n#### 29 - `Spring-Boot-29-Logging`\n-   **Description**: Focuses on configuring and utilizing logging frameworks (e.g., Logback, Log4j2) in a Spring Boot application, demonstrating different log levels and output destinations.\n-   **Technologies**: Spring Boot, Logging (Logback/Log4j2).\n-   **Database**: PostgreSQL (default).\n\n#### 30 - `Spring-Boot-30-BaseRequest-BaseEntity-BaseResponse`\n-   **Description**: Implements common architectural patterns using base classes for requests, entities, and responses to promote code reusability and maintainability in a Spring Boot application.\n-   **Technologies**: Spring Boot, Design Patterns.\n-   **Database**: PostgreSQL (default).\n\n#### 31 - `Spring-Boot-31-WebFlux-Security-MongoDB-RateLimit-Configuration`\n-   **Description**: A reactive Spring Boot application using WebFlux, incorporating Spring Security for authentication/authorization, MongoDB for data storage, implementing rate limiting for API protection., Logging to Mongo Db per request and response (headers,body, all of parameters).\n-   **Technologies**: Spring Boot WebFlux, Spring Security, MongoDB, Rate Limiting.\n-   **Database**: MongoDB.\n\n#### 32 - `Spring-Boot-32-Security-WebFlux-Logging-RateLimit-MongoDB`\n-   **Description**: A comprehensive reactive application built with Spring Boot WebFlux, featuring Spring Security, robust logging, API rate limiting, and MongoDB persistence.\n-   **Technologies**: Spring Boot WebFlux, Spring Security, Logging, Rate Limiting, MongoDB.\n-   **Database**: MongoDB.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelalaygar%2Fspring-boot-2-3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcelalaygar%2Fspring-boot-2-3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcelalaygar%2Fspring-boot-2-3/lists"}