# xkcoding/spring-boot-demo

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/xkcoding-spring-boot-demo).**

34,101 stars · 10,930 forks · Java · MIT

## Links

- GitHub: https://github.com/xkcoding/spring-boot-demo
- Homepage: https://parg.co/UZM
- awesome-repositories: https://awesome-repositories.com/repository/xkcoding-spring-boot-demo.md

## Topics

`demo` `in-action` `java` `spring` `spring-boot` `spring-boot-2` `spring-boot-demo` `web` `xkcoding`

## Description

This project is a comprehensive reference collection of practical implementation examples and patterns for building applications with Spring Boot. It serves as a Java web application template and a showcase for developing functional web services featuring REST endpoints, template engines, and global exception handling.

The repository distinguishes itself by providing detailed demonstrations of enterprise-grade features, including distributed locking, task scheduling, and asynchronous message exchange using brokers like RabbitMQ. It also includes reference implementations for automated API documentation and a variety of data integration patterns.

The project covers a broad range of capability areas, including enterprise authentication and security via JWT, LDAP, and third-party providers. It demonstrates extensive data storage integration across relational databases with sharding and multi-datasource routing, as well as NoSQL stores such as MongoDB, Redis, and Elasticsearch. Additional coverage includes real-time bidirectional communication systems, monitoring and observability tools, and traffic management through local and distributed rate limiting.

## Tags

### Education & Learning Resources

- [Spring Framework Resources](https://awesome-repositories.com/f/education-learning-resources/java-virtual-machine-learning-resources/spring-framework-resources.md) — Serves as a comprehensive reference for building functional web services using the Spring Boot framework.

### Data & Databases

- [Database ORMs](https://awesome-repositories.com/f/data-databases/database-orms.md) — Implements data mapping between database records and Java objects using various ORM frameworks. ([source](https://github.com/xkcoding/spring-boot-demo/tree/master/demo-orm-beetlsql))
- [Relational Database Connectors](https://awesome-repositories.com/f/data-databases/relational-database-connectors.md) — Performs data operations on SQL databases using mapping frameworks and multi-datasource routing. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/TODO.md))
- [Data Access Layers](https://awesome-repositories.com/f/data-databases/data-access-layers.md) — Provides a common data access layer to handle standard CRUD operations without repetitive boilerplate code. ([source](https://github.com/xkcoding/spring-boot-demo/tree/master/demo-orm-mybatis-mapper-page))
- [Application Caching](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/application-caching.md) — Implements in-memory and distributed caching to store frequently accessed data and reduce database load. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-cache-redis))
- [SQL Templating Engines](https://awesome-repositories.com/f/data-databases/data-querying/sql-templating-engines.md) — Provides integration with template-based SQL engines to simplify the execution of dynamic queries. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-orm-beetlsql))
- [Runtime Connection Management](https://awesome-repositories.com/f/data-databases/database-connection-managers/runtime-connection-management.md) — Adds, removes, and switches between database connections at runtime via an API. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-dynamic-datasource))
- [Database Schema Migrations](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-management/database-schema-migrations.md) — Automatically tracks and applies versioned database schema changes during application startup. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/pom.xml))
- [Database Sharding](https://awesome-repositories.com/f/data-databases/database-sharding.md) — Distributes data across multiple databases and tables to improve horizontal scalability and performance. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-sharding-jdbc))
- [Query Routing](https://awesome-repositories.com/f/data-databases/distributed-sql-databases/query-routing.md) — Directs SQL queries between different data sources to manage traffic between master and slave databases. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-multi-datasource-mybatis))
- [Enterprise Coordination Patterns](https://awesome-repositories.com/f/data-databases/distributed-task-schedulers/enterprise-coordination-patterns.md) — Showcases enterprise-grade patterns including distributed locking and asynchronous RabbitMQ messaging.
- [Multi-Database Connection Configuration](https://awesome-repositories.com/f/data-databases/multi-database-connection-configuration.md) — Manages multiple independent database connection pools to route queries to different data stores simultaneously. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-multi-datasource-jpa))
- [Object-Relational Mapping](https://awesome-repositories.com/f/data-databases/object-relational-mapping.md) — Maps relational database records to Java objects using the MyBatis framework. ([source](https://github.com/xkcoding/spring-boot-demo/tree/master/demo-orm-mybatis))
- [Multi-datasource Configurators](https://awesome-repositories.com/f/data-databases/reactive-databases/reactive-datasource-configurators/multi-datasource-configurators.md) — Provides mechanisms to switch between different database connections at runtime for master-slave or multi-tenant environments.
- [Search and Indexing](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-and-indexing.md) — Integrates with Elasticsearch for index management and the execution of complex aggregation queries. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-elasticsearch))

### Security & Cryptography

- [Enterprise Authentication](https://awesome-repositories.com/f/security-cryptography/enterprise-authentication.md) — Implements secure enterprise access using JWT, LDAP directory services, and third-party social login.
- [JWT Authentication](https://awesome-repositories.com/f/security-cryptography/jwt-authentication.md) — Implements identity verification using JSON Web Tokens for session management and single-device login. ([source](https://github.com/xkcoding/spring-boot-demo/tree/master/demo-rbac-security))
- [Role-Based Access Control](https://awesome-repositories.com/f/security-cryptography/role-based-access-control.md) — Implements a role-based access control model to restrict resource access based on user permissions. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/README.md))
- [Token-Based Authentication](https://awesome-repositories.com/f/security-cryptography/token-based-authentication.md) — Validates user identities using cryptographic tokens to manage sessions in a distributed environment.
- [LDAP Services](https://awesome-repositories.com/f/security-cryptography/ldap-services.md) — Executes CRUD operations on directory services to manage organizational and user data via LDAP. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-ldap))
- [Session Synchronization](https://awesome-repositories.com/f/security-cryptography/session-synchronization.md) — Synchronizes session data across multiple application instances to maintain authentication during restarts. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-session))
- [Social Authentication Providers](https://awesome-repositories.com/f/security-cryptography/social-authentication-providers.md) — Integrates with social providers and external identity services for single sign-on authentication. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/TODO.md))

### Web Development

- [Application Boilerplates](https://awesome-repositories.com/f/web-development/application-boilerplates.md) — Provides a boilerplate Java web application template featuring REST endpoints and JWT authentication.
- [RESTful Services](https://awesome-repositories.com/f/web-development/restful-services.md) — Implements RESTful web services using controllers to handle HTTP requests and responses. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/pom.xml))
- [API Documentation](https://awesome-repositories.com/f/web-development/api-documentation.md) — Generates interactive web interfaces to document and test backend service endpoints automatically.
- [Error Response Mappers](https://awesome-repositories.com/f/web-development/error-response-mappers.md) — Translates internal application exceptions into standardized HTTP status codes and predictable error payloads. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-exception-handler))
- [Real-Time Communication](https://awesome-repositories.com/f/web-development/real-time-communication.md) — Establishes persistent bidirectional connections between clients and servers for instant data exchange. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/TODO.md))

### Artificial Intelligence & ML

- [LDAP Authentication](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-orchestration-multi-agent/security-and-auth/authentication-strategies/identity-providers/ldap-authentication.md) — Verifies user credentials against an LDAP directory service to provide secure authentication. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-ldap))

### Development Tools & Productivity

- [Code Generation](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/code-generation.md) — Automatically produces boilerplate source code by applying predefined templates to database schemas.

### DevOps & Infrastructure

- [Containerized Deployments](https://awesome-repositories.com/f/devops-infrastructure/containerized-deployments.md) — Supports packaging applications into portable container images for consistent deployment across environments. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-docker))
- [Distributed Locks](https://awesome-repositories.com/f/devops-infrastructure/distributed-locks.md) — Implements distributed locking mechanisms to ensure mutual exclusion of code blocks across a server cluster. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-zookeeper))
- [Distributed Task Schedulers](https://awesome-repositories.com/f/devops-infrastructure/distributed-task-schedulers.md) — Integrates a centralized scheduler to manage and execute timed jobs across multiple server instances. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-task-xxl-job))
- [Rate Limiting](https://awesome-repositories.com/f/devops-infrastructure/rate-limiting.md) — Provides distributed rate limiting across multiple instances to protect API endpoints from malicious traffic. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-ratelimit-redis))

### Networking & Communication

- [Message Brokers](https://awesome-repositories.com/f/networking-communication/message-brokers.md) — Integrates message brokers like RabbitMQ to enable asynchronous communication and decoupling between services. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/pom.xml))
- [Remote Procedure Calls](https://awesome-repositories.com/f/networking-communication/remote-procedure-calls.md) — Enables communication between distributed applications by invoking methods on remote servers.
- [Dubbo Integration](https://awesome-repositories.com/f/networking-communication/rpc-frameworks/dubbo-integration.md) — Integrates Dubbo RPC to enable communication between distributed applications via remote procedure calls. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-dubbo))
- [Socket Communication](https://awesome-repositories.com/f/networking-communication/socket-communication.md) — Uses socket communication to establish persistent connections for low-latency real-time data exchange.

### Software Engineering & Architecture

- [API Documentation Generators](https://awesome-repositories.com/f/software-engineering-architecture/api-documentation-generators.md) — Provides automatic generation of interactive API documentation by scanning source code annotations. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/TODO.en.md))
- [Application Configuration](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/configuration-scopes/application-configuration.md) — Provides methods for externalizing application settings and managing environment-specific configurations via configuration files. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-properties))
- [Asynchronous Execution](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/asynchronous-execution.md) — Provides asynchronous execution models to run logic in separate threads and improve application responsiveness. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/TODO.md))
- [Automated API Documentation](https://awesome-repositories.com/f/software-engineering-architecture/automated-api-documentation.md) — Demonstrates the automated generation of technical API specifications directly from source code definitions.
- [Asynchronous Task Execution](https://awesome-repositories.com/f/software-engineering-architecture/concurrency-models/asynchronous-task-execution.md) — Executes background processes independently of the main request thread to improve system throughput. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-async))
- [Background Task Schedulers](https://awesome-repositories.com/f/software-engineering-architecture/execution-control/background-task-schedulers.md) — Provides tools to create, pause, and modify the execution timing of recurring background jobs. ([source](https://github.com/xkcoding/spring-boot-demo#readme))
- [Global Exception Handlers](https://awesome-repositories.com/f/software-engineering-architecture/global-exception-handlers.md) — Implements centralized exception handlers to return consistent and formatted error responses across the application. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/TODO.md))
- [Rate Limiting](https://awesome-repositories.com/f/software-engineering-architecture/request-throttling/rate-limiting.md) — Implements local rate limiting to control the frequency of user requests and prevent endpoint overload. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/pom.xml))

### User Interface & Experience

- [HTML Template Renderers](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/presentation-engines/template-engines/server-side-rendering-engines/html-template-renderers.md) — Integrates template engines to merge data with predefined layouts for rendering dynamic HTML views. ([source](https://github.com/xkcoding/spring-boot-demo/blob/master/demo-template-beetl))

### Part of an Awesome List

- [SpringBoot 项目](https://awesome-repositories.com/f/awesome-lists/more/springboot.md) — Listed in the “SpringBoot 项目” section of the Great Open Source Project awesome list.
