Skip to content

Conversation

@dustinbyrne
Copy link
Contributor

@dustinbyrne dustinbyrne commented Oct 24, 2025

#skip-changelog

This pull request adds a sample Spring Boot application demonstrating how to integrate the PostHog server-side SDK as a Spring-managed bean.

Overview

This sample shows how to:

  • Configure PostHog as a Spring Bean using dependency injection
  • Inject the PostHog client into Spring controllers
  • Capture events from REST API endpoints
  • Configure PostHog via Spring properties

@dustinbyrne dustinbyrne requested a review from a team as a code owner October 24, 2025 16:08
This demonstrates the usage of a PostHog client as a Spring-managed bean
with dependency injection into a controller.
@dustinbyrne dustinbyrne force-pushed the feat/add-spring-sample branch from ddc0b6d to 3381edb Compare October 24, 2025 16:11
Copy link
Contributor

@ioannisj ioannisj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know much about Spring but this is a sample and looks clean and sensible

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time to rename this repo to posthog-jvm/-java or something :D
jvm isnt the best either because android runs on art which is not the same as jvm

@dustinbyrne dustinbyrne merged commit 401a150 into main Nov 5, 2025
10 of 11 checks passed
@dustinbyrne dustinbyrne deleted the feat/add-spring-sample branch November 5, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants