304-frameworks-spring-boot-hikari

304-frameworks-spring-boot-hikari is a cursor rule for Cursor from jabrena/cursor-rules-spring-boot. It costs 0 tokens per session (2,704 once invoked), scanned A, original, Apache-2.0.

A set of guidelines for configuring HikariCP, the database connection pool used by default in Spring Boot. A connection pool keeps reusable database connections available to the application.

In plain words
What is it for?
Use it to set pool sizes, connection timeouts, connection lifecycles, health checks, metrics, logging, and separate development, test, and production configurations.
Why use it?
It helps prevent too many or too few database connections and makes timeout and health problems easier to detect. The guidance also covers monitoring and environment-specific settings.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/jabrena/cursor-rules-spring-boot/304-frameworks-spring-boot-hikari
Clone the repo
git clone --depth 1 https://github.com/jabrena/cursor-rules-spring-boot

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 304-frameworks-spring-boot-hikari

README.md
[![agentmods](https://agentmods.dev/badge/rules/jabrena/cursor-rules-spring-boot/304-frameworks-spring-boot-hikari.svg)](https://agentmods.dev/rules/jabrena/cursor-rules-spring-boot/304-frameworks-spring-boot-hikari)
Your own site
<a href="https://agentmods.dev/rules/jabrena/cursor-rules-spring-boot/304-frameworks-spring-boot-hikari"><img src="https://agentmods.dev/badge/rules/jabrena/cursor-rules-spring-boot/304-frameworks-spring-boot-hikari.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02704
Opus 5 $0.00000 $0.01352
Sonnet 5 $0.00000 $0.00541
Haiku 4.5 $0.00000 $0.00270

Measured 6d ago against content hash 664845bf5a6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

304-frameworks-spring-boot-hikari scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/304-frameworks-spring-boot-hikari.mdc · 396 lines

How it starts

The opening of the file, as written. The whole thing — 396 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spring Boot HikariCP Connection Pool Configuration

HikariCP is the default connection pool for Spring Boot and is known for being the fastest, most reliable connection pool available for Java applications. This guide will help you configure HikariCP optimally for your Spring Boot applications.

Implementing These Principles

These guidelines are built upon the following core principles:

  • Performance First: Configure pool sizes based on your application's actual database concurrency needs
  • Resource Efficiency: Balance connection availability with memory and database server resources
  • Monitoring & Observability: Enable metrics and logging to understand pool behavior
  • Environment-Specific: Adjust configurations based on development, testing, and production environments
  • Fail-Fast: Configure appropriate timeouts to detect issues quickly

Table of contents

  • Rule 1: Essential Pool Sizing Configuration
  • Rule 2: Connection Timeout and Lifecycle Management
  • Rule 3: Health Check and Validation Configuration
  • Rule 4: Performance Monitoring and Metrics
  • Rule 5: Environment-Specific Configuration Strategies

Rule 1: Essential Pool Sizing Configuration

Title: Right-size your connection pool based on application needs

Description: The most critical aspect of HikariCP configuration is determining the optimal pool size. Ask yourself: "How many concurrent database operations does my application actually need?" Most applications need far fewer connections than developers initially think.

Key Questions to Ask:

  • How many concurrent users will access my application?
  • How many database operations happen per user request?
  • What's my database server's connection limit?
  • Am I running multiple application instances?

Good example:

# application.yml
spring:
  datasource:
    hikari:
      # Start with this formula: connections = ((core_count * 2) + effective_spindle_count)
      # For most web apps: 10-15 connections is often sufficient
      maximum-pool-size: 10
      minimum-idle: 5
      # Allow pool to shrink during low activity
      idle-timeout: 300000  # 5 minutes

Read the full file on GitHub · 396 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 396 lines · 0 tokens per session scan A 664845bf5a6d

Subscribe to this mod's changes

304-frameworks-spring-boot-hikari is a cursor rule published in the GitHub repository jabrena/cursor-rules-spring-boot (47 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,704 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.