Skip to content

devslab-kr/devslab-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devslab-examples

English · 한국어

Runnable examples for devslab-kr Spring Boot starters and libraries.

Each subdirectory is an independent Spring Boot application with its own Gradle build. Pick one, cd into it, and run ./gradlew bootRun.

💬 Questions, ideas, or sharing your application of the demos? Head to Discussions — bilingual (English / Korean), maintained by the same folks who write the libraries.

Examples

easy-paging — Spring Boot 4 (4.x line)

Latest active line. Use these if your app is on Spring Boot 4+.

Demo Showcases Maven Central
easy-paging-sb4-demo Annotation-driven offset pagination with @AutoPaginate (Spring Boot 4 + MyBatis + H2) Maven Central
easy-paging-sb4-keyset-demo Cursor (keyset) pagination with @KeysetPaginate — composite (time, id) key, stable under writes, no OFFSET/COUNT(*) Maven Central
easy-paging-sb4-postgres-demo Same starter against real PostgreSQL — Docker Compose for bootRun, Testcontainers + @ServiceConnection for tests, no local DB install Maven Central
easy-paging-sb4-reactive-demo Reactive stack — WebFlux + R2DBC via R2dbcOffsetPagingSupport. Same JSON envelope as the MVC demos, served as Mono<PageResponse<T>> Maven Central

easy-paging — Spring Boot 3 maintenance (3.x line)

For apps still on Spring Boot 3.3–3.5. The starter's 3.x branch continues to receive SB3 security patches; these demos pin against that line.

Demo Showcases Maven Central
easy-paging-demo Annotation-driven offset pagination with @AutoPaginate (Spring Boot 3 + MyBatis + H2) Maven Central 3.x
easy-paging-keyset-demo Cursor (keyset) pagination with @KeysetPaginate Maven Central 3.x
easy-paging-postgres-demo Same starter against real PostgreSQL Maven Central 3.x
easy-paging-reactive-demo Reactive stack — WebFlux + R2DBC Maven Central 3.x

ssrf-guard

Demo Showcases Maven Central
ssrf-guard-demo SSRF (Server-Side Request Forgery) protection across three Spring HTTP clients (RestClient, RestTemplate, WebClient) — same UrlPolicy for all. 15-pattern attack matrix endpoint, Micrometer metrics. Maven Central
ssrf-guard-springai-demo LLM agent SSRF defense (Spring AI). Wraps every Spring AI ToolCallback so URL-shaped tool arguments are validated before the LLM-driven fetch_url runs. Fake-LLM driver makes the demo runnable offline (no API key). Maven Central
ssrf-guard-langchain4j-demo LLM agent SSRF defense (LangChain4j). Same story for the other major Java LLM framework — wraps every ToolExecutor bean and validates ToolExecutionRequest.arguments() JSON before the executor runs. Maven Central
ssrf-guard-feign-demo Spring Cloud OpenFeign RequestInterceptor — same UrlPolicy applied to @FeignClient calls. Two @FeignClient interfaces (one whitelisted, one not) to show the block path. Maven Central
ssrf-guard-jdkhttp-demo java.net.http.HttpClient (Java 11+) wrapper — no Spring required by the library. Three-line wiring in main(). Maven Central
ssrf-guard-okhttp-demo OkHttp Interceptor + Dns integration — also no Spring needed. Three-line wiring on OkHttpClient.Builder. Maven Central
ssrf-guard-httpclient5-demo Apache HttpClient 5 — DNS-time SSRF gate (SafeDnsResolver) + SafeRedirectStrategy. Zero wiring code in Spring (module ships its own autoconfig); five-line wiring outside Spring. The TOCTOU-closing approach: validate=connect on the same InetAddress[]. Maven Central
ssrf-guard-native-image-demo GraalVM native-image proof. Pulls ssrf-guard:3.1.0, applies the org.graalvm.buildtools.native plugin, demonstrates nativeCompile produces a working native binary that blocks the same 12-pattern attack matrix as the JVM build. End-to-end verification that ssrf-guard 3.1.0's RuntimeHintsRegistrar entries are complete. Maven Central

Conventions

  • Each demo is a standalone Gradle project — its own settings.gradle.kts, build.gradle.kts, and gradlew. Demos do not share a root build, so their dependency versions and JDK targets can drift independently.
  • Each demo depends on the latest stable release of the starter it showcases (pinned by version in build.gradle.kts). Dependabot bumps it on new releases.
  • This repo is not versioned or tagged — demos are not published artifacts. main is the source of truth.
  • Each demo has its own README.md with quickstart, prerequisites, and a tour of what the starter is doing.

Adding a new demo

  1. Create <starter-shortname>-demo/ at the repo root.
  2. Copy the layout of an existing demo (e.g. easy-paging-demo/) as a template.
  3. Add a row to the table above linking to the demo and to its starter on Maven Central.
  4. CI auto-detects the new demo from the presence of build.gradle.kts — no workflow changes needed.

CI

Pull requests build only the demos whose files changed. Pushes to main build every demo (catches drift from starter version bumps).

About

Runnable Spring Boot demos for devslab-kr libraries — pagination (easy-paging) and SSRF defense (ssrf-guard, including LLM-agent tool URL validation via Spring AI). Clone, bootRun, curl.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages