Skip to content

Latest commit

 

History

History
92 lines (70 loc) · 2.42 KB

File metadata and controls

92 lines (70 loc) · 2.42 KB

Spring Smart Door Lock Socket

A Spring Boot WebSocket application for managing smart door lock communications.

Project Overview

This project implements a WebSocket server using Spring Boot to handle real-time communications for smart door lock systems. It includes Redis Stream integration for message handling and WebSocket functionality for client-server communication.

Features

  • WebSocket server implementation
  • Redis Stream integration for message handling
  • Push notification support
  • Client management system
  • Global exception handling
  • Configuration management

Project Structure

src/
├── main/
    ├── java/spring/socket/
    │   ├── config/
    │   │   ├── EnvConfig.java
    │   │   ├── Global.java
    │   │   ├── RedisStreamConfig.java
    │   │   └── WebConfig.java
    │   ├── controller/
    │   │   └── PushController.java
    │   ├── exception/
    │   │   ├── ErrorDetails.java
    │   │   ├── GlobalExceptionHandler.java
    │   │   └── ResourceNotFoundException.java
    │   ├── tiosocket/
    │   │   ├── ClientManager.java
    │   │   ├── MyMsgHandler.java
    │   │   ├── RedisStreamPublisher.java
    │   │   ├── RedisStreamSubscriber.java
    │   │   └── RedisSubscriber.java
    │   └── SocketApplication.java
    └── resources/
        └── application.yml

Prerequisites

  • Java 8 or higher
  • Maven
  • Redis Server

Getting Started

  1. Clone the repository:
git clone https://github.com/snowflakeworld/Spring_SmartDoorLockSocket.git
  1. Navigate to the project directory:
cd Spring_SmartDoorLockSocket
  1. Build the project:
./mvnw clean install
  1. Run the application:
./mvnw spring-boot:run

Configuration

The application can be configured through the application.yml file located in the src/main/resources directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Project Link: https://github.com/snowflakeworld/Spring_SmartDoorLockSocket