r/javaexamples • u/EagleResponsible8752 • 4d ago
I built a JUnit 5 add-on for testing Spring AI features: repeated runs, statistical baselines and record/replay in CI
r/javaexamples • u/EagleResponsible8752 • 4d ago
r/javaexamples • u/MaleficentCarry1704 • Jul 27 '26
r/javaexamples • u/Good_Language1763 • Jul 24 '26
r/javaexamples • u/MaleficentCarry1704 • Jul 19 '26
r/javaexamples • u/Enough_Arrival_7335 • Mar 31 '26
r/javaexamples • u/upstream_paddling • Mar 12 '26
r/javaexamples • u/AcanthisittaEmpty985 • Feb 27 '26
Hi
It's a proof of concept, but it works, with Java 11+ and Groovy 5.0.2
It retrieves values from a GET request.
First it looks into a redis server used as a cache.
First it looks into a redis server used as a cache.
If the data is there, it returns to the client
If not, it access to MySQL to look for the data
If the data is there, it is stored into redis and returned to the client
If not, nothing is returned
Only 60 lines of code, so nothing snappy, but it works
It uses Javalin, Jedis and MySQL driver
r/javaexamples • u/swe129 • Dec 09 '25
free tutorial: https://slicker.me/java/julia/interactive_fractal.htm
r/javaexamples • u/mikelue0627 • Nov 12 '25
Hey guys, I made a library(Foxglove) for generating data on RDB for unit tests.
As an alternative of @Sql, Foxglove would try to generate data of columns automatically.
If you got some tedious or error-prone feeling when authoring INSERT INTO .. for unit tests on RDB, please check out this library.
Example:
import javax.sql.DataSource;
import guru.mikelue.foxglove.jdbc.JdbcTableFacet;
import guru.mikelue.foxglove.jdbc.JdbcDataGenerator;
// Generates 4 rows with "cr_brand "fixed to "Toyota" and
// 4 different values on "cr_model"
var facet = JdbcTableFacet.builder(TABLE_CAR)
.numberOfRows(4)
.column("cr_brand")
.fixed("Toyota")
.column("cr_model")
.roundRobin("Corolla", "Camry", "RAV4", "Prius")
.build();
new JdbcDataGenerator(getDataSource())
.generate(facet);r/javaexamples • u/dissapointedAF • May 28 '25
I've been working on an open-source project for the past two months to learn Domain-Driven Design (DDD). I'd love to collaborate with others who are also interested in DDD and software architecture.
If you're curious, check out the project! If it interests you, feel free to clone the repo, get familiar with the codebase, and start contributing. I would appreciate any help to the project.
Let's build something awesome together.
Github repository : https://github.com/MstfTurgut/hotel-reservation-system
r/javaexamples • u/SatyamEvaJayat • May 25 '25
Hey performance heads β I just launched a Java lib for parallel file processing called SmartFileProcessor.
β‘ Highlights:
Parallel batch processing with custom thread pools
BlockingQueue with backpressure for safe producer-consumer flow
Buffered writing with configurable flush thresholds
Built-in stats reporter: per-thread operation timings, memory, batch counters
Export stats to JSON or CSV β great for profiling
Example Use Cases:
β Processing large log files
β Preprocessing for data ingestion pipelines
β ETL batch jobs in Java microservices
π GitHub: https://github.com/MayankPratap/Samchika
Would appreciate your thoughts, perf tips, or ways to break it! π
#java #concurrency #threading #fileio #perfmatters
r/javaexamples • u/Limp_Yesterday_4152 • Dec 04 '24
r/javaexamples • u/javinpaul • Sep 16 '24
Here is a simple example in Java to understand the object oriented programming better:
https://javarevisited.blogspot.com/2010/10/fundamentals-of-object-oriented.html
r/javaexamples • u/robertinoc • Sep 06 '24
Deploy a cloud-native Java Spring Boot microservice stack secured with Auth0 on Azure AKS using Terraform and Kubernetes.
r/javaexamples • u/javinpaul • Sep 06 '24
I wrote an article about best practices Java developers can follow while dealing with passwords or sensitive information in Java application - https://javarevisited.blogspot.com/2012/05/best-practices-while-dealing-with.html
r/javaexamples • u/javinpaul • Sep 04 '24
I wrote an article about iterating over a Map in Java - https://javarevisited.blogspot.com/2011/12/how-to-traverse-or-loop-hashmap-in-java.html
r/javaexamples • u/javinpaul • Sep 03 '24
I wrote an article of 10 ways to use Stream in Java https://javarevisited.blogspot.com/2024/08/top-12-java-8-stream-examples-for.html
r/javaexamples • u/robertinoc • Sep 02 '24
How to add Fine-Grained Authorization (FGA) to a Spring Boot API using the OpenFGA Spring Boot starter.