Skip to content

Enhance your SpringApplication's stability with a SaaS library by simply adding a single dependency—no need for additional infrastructure setup or complex code changes!

License

Notifications You must be signed in to change notification settings

PENEKhun/springdog

Repository files navigation

springdog

Build Status Codecov Maven Central JavaDoc License

Enhance your software's security and stability with a SaaS library by simply adding a single dependency—no need for additional infrastructure setup or complex code changes!

Requirements

⚠️ Requires Java 17+ and Spring Boot 3.x

Quick Start

  1. Add the Springdog dependency to your build.gradle or pom.xml.

    dependencies {
        // Fill in the version with the latest version.
        implementation "org.easypeelsecurity:springdog-starter:${springdogVersion}"
        annotationProcessor "org.easypeelsecurity:springdog-starter:${springdogVersion}"
    }
  2. Enable the Springdog agent by adding the @SpringDogEnable annotation to your main class.

    @SpringDogEnable // Add this annotation to your main class or bean class.
    @SpringBootApplication
    public class YourMainApplication {
      public static void main(String[] args) {
        SpringApplication.run(YourMainApplication.class, args);
      }
    }
  3. Run your application and access the Springdog agent in your browser.

    GET http://localhost:8080/springdog/
    // Host and port may vary depending on your application configuration.

Features

Spring-friendly Rate Limit

Easily limit the request rate to your application endpoints to protect resources.

Spring-friendly Rate Limit

System & Endpoint Monitoring & Notification

Monitor system resource usage and endpoint performance in real-time, and receive email notifications when thresholds are exceeded, allowing for quick responses to potential issues.

  • Endpoint Monitoring:

    You can monitor the request volume and average response time for each endpoint.

    Endpoint Monitoring

  • System Usage Monitoring:

    Monitor system usage as shown below:

    SystemWatch

  • Email Notifications:

    Receive email notifications when the thresholds set in the monitoring exceed or return to normal. To enable this feature, you need to activate SMTP using a Gmail account.

    Enable SMTP

You can also customize the email templates.

  • Edit Email Template Email Template
  • Email Template Preview Email Template Preview

Properties

springdog:
  agent:
    basePath: springdog
    username: admin
    password: admin
    externalAccess: false

springdog.agent

The Springdog agent configuration.

Name Required Description Default Value Sets
basePath x The base path for the agent. Used to access the Springdog agent from a deployed server, such as {{host}}/springdog/. The basePath used with this option should never be used as the controller mapping address for your application. springdog
username x The username for the Springdog agent. Empty fields are not allowed. admin
password x The password for the Springdog agent. Empty fields are not allowed. admin
externalAccess x Whether to allow external access to the Springdog agent. If false, access from external IPs is not allowed. false true or false

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. More information can be found in the CONTRIBUTING.md file.

License

This project is licensed under the terms of the Apache 2.0 license.

About

Enhance your SpringApplication's stability with a SaaS library by simply adding a single dependency—no need for additional infrastructure setup or complex code changes!

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published