r/JavaProgramming • • Jul 11 '26

Tired of Docker/LocalStack boot times in JVM tests? CloudStub mocks AWS in-process.

0 Upvotes

Hey all, I have been working on CloudStub, an open-source in-process AWS mock for JVM integration tests (Java, Kotlin, Scala), and we just published 0.1.0-beta.8 to Maven Central.

The problem it targets: container-based AWS mocking (a mock image run through Testcontainers) is powerful, but it drags on your local test loop and CI with image pulls and container boot and teardown. CloudStub skips all of that.

How it works, no magic: it boots a lightweight HTTP mock inside your JVM and points the AWS SDK's endpoint at it (via the aws.endpoint-url system property), so your code makes real AWS SDK v2 calls against a local stub. No Docker, no containers, no separate process. WireMock and Jetty are shaded into private packages and fully hidden, so there is no classpath or Spring Boot BOM conflict.

What is nice about it:

  • No container overhead. Nothing to pull or boot: the mock runs in the same JVM as your tests.

  • Stateful, not just canned responses. An SQS SendMessage is returned by a later ReceiveMessage, and DynamoDB PutItem / GetItem / Query return live data, so you test real round-trips.

  • Modular. Each service is an isolated module. If you only use DynamoDB, only that module loads.

  • Not just for tests, it also runs standalone. cloudstub-local is a drop-in local mock server on port 4566 (so AWS_ENDPOINT_URL=http://localhost:4566 works unchanged), auto-downloads the services you enable, and ships a CLI (cloudstub / clb) plus a web console at /console. Download: https://github.com/cloudstub/cloudstub/releases/download/v0.1.0-beta.8/cloudstub-local.jar

  • Two ways to load services. Add a service module as a normal test dependency, or skip Gradle for it and list it on the extension with .withModules("sqs", "dynamodb"), which fetches the jar from Maven Central on first run and caches it under ~/.cloudstub/modules. (S3 is the exception: it ships a client-side SDK component, so it must be a normal test dependency.)

  • Available now in beta.8: SQS, SNS, S3, Secrets Manager, DynamoDB, Lambda, and SSM (Systems Manager Parameter Store). AWS SDK v2 is first-class, and there is an SDK v1 companion module.

  • Java 17 or newer.

Setup (Gradle):

// cloudstub-testing brings the engine plus the JUnit 5 and 6 extension
// (cloudstub-junit and cloudstub-core come in transitively)
testImplementation "io.github.cloudstub:cloudstub-testing:0.1.0-beta.8"
// Service modules are optional here: list them on the extension with .withModules(...) and they are
// auto-downloaded from Maven Central. Add a service as a dependency only if you prefer it on the
// classpath (and S3 must be a dependency):
// testImplementation "io.github.cloudstub:cloudstub-dynamodb:0.1.0-beta.8"

Setup (Maven):

<dependency>
  <groupId>io.github.cloudstub</groupId>
  <artifactId>cloudstub-testing</artifactId>
  <version>0.1.0-beta.8</version>
  <scope>test</scope>
</dependency>
<!-- Service modules are optional: use .withModules(...) to auto-download them instead. Declare one
     explicitly only if you prefer it on the classpath (and S3 must be a dependency). -->
<dependency>
  <groupId>io.github.cloudstub</groupId>
  <artifactId>cloudstub-dynamodb</artifactId>
  <version>0.1.0-beta.8</version>
  <scope>test</scope>
</dependency>

A test looks like this. You exercise your own code, and CloudStub stands in for AWS:

static CloudStubExtension cloud = new CloudStubExtension()
        .withModules("dynamodb");   // fetched from Maven Central on first run, then cached; no Gradle dependency needed

u/Test
void savedItemIsReadBack() {
    repository.save("order-1", "placed");                             // your repo, using a normal AWS SDK v2 DynamoDbClient
    assertEquals(Optional.of("placed"), repository.find("order-1"));  // round-trips through the stub
}

It is beta, so the API can still shift and the service coverage is deliberately narrow, but the core engine is stable and the modules above are usable today.

I would genuinely like feedback on the architecture, and if there is an AWS service or SDK behavior you want stubbed next, open an issue. Thanks.


r/JavaProgramming • • 21d ago

Is Java a good career choice in 2027? (2 YOE overall, 1 year in Java

Thumbnail reddit.com
0 Upvotes

r/JavaProgramming • • Nov 12 '24

JDBC connectivity problem i vs code.

Thumbnail reddit.com
0 Upvotes

r/JavaProgramming • • Oct 23 '24

Navigate Early Development | Simplify Data Storage

Thumbnail
medium.com
0 Upvotes

r/JavaProgramming • • Apr 10 '24

Program to print the Second smallest number in Java

Thumbnail medium.com
0 Upvotes

r/JavaProgramming • • Oct 06 '24

Starting JAVA in 3rd year of University feeling overwhelmed, need advice.

0 Upvotes

I’m currently in my 3rd year of university, and I’ve just started learning Java through a YouTube course. I’m feeling pretty overwhelmed by the amount of content, especially since many of my peers are far ahead in their programming skills. It feels like I’m playing catch-up, and it’s a bit discouraging.

For those of you who have been in a similar situation or have experience with Java, do you have any advice for pacing myself, understanding difficult concepts, or not feeling too behind? Any tips on how to approach the learning process or manage this overwhelming feeling would be really appreciated! laso, if anyone has suggestions for good Java courses (preferably beginner-friendly) or resources that helped them, I’d really appreciate it!

Thanks in advance !


r/JavaProgramming • • Sep 12 '24

How submitting using “Pair” in Java is faster than direct assignments?

Thumbnail reddit.com
0 Upvotes

r/JavaProgramming • • Oct 02 '24

Arf Spoiler

0 Upvotes

How do I run this Java file?

  1. Create three separate files in Code Editor with the same names.

  2. Copy and paste the corresponding code into each file.

Animal.java:

public class Animal {
    private String name;

    public Animal(String name) {
        this.name = name;
    }

    public void sound() {
        System.out.println("The animal makes a sound.");
    }

    public String getName() {
        return name;
    }
}

Dog.java:

public class Dog extends Animal {
    public Dog(String name) {
        super(name);
    }

    @Override
    public void sound() {
        System.out.println("The dog barks.");
    }
}

Main.java:

public class Main {
    public static void main(String[] args) {
        Dog myDog = new Dog("Max");
        System.out.println(myDog.getName());
        myDog.sound();
    }
}

After creating and pasting the code:

  1. Save all three files.

  2. Compile Main.java.

  3. Run Main.java.

You should see the output:

Max
The dog barks

r/JavaProgramming • • Jan 12 '25

Handler dispatch failed: java.lang.Error: Unresolv…GrantedAuthority) is undefined for the type List error during login in Java Spring Boot application

0 Upvotes

I'm encountering an error when attempting to log in to my application. Upon trying to authenticate, I receive the following error:

Handler dispatch failed: java.lang.Error: Unresolv…GrantedAuthority) is undefined for the type List

My goal is to successfully log in and obtain an access token, which I need to use for various operations throughout the project.

Can someone help me understand where the problem might be and how to resolve it? I believe it might be related to how I'm handling authorities or roles, but I'm not sure.

Any guidance would be appreciated!


r/JavaProgramming • • Jan 07 '25

Where do I start?

0 Upvotes

Hi there everyone

So I have recently decided that I want to persue a career as a Java developer and I was just wondering, what certificate should I be doing first?

The problem is I have a basic understanding of software engineering / developing but I want to specialize in Java. I know having a few languages under the belt is a good thing, but Java has always just interested me more.

Any recommendations would be welcome, I am looking at the oracle website for training and certifications.

Thanks


r/JavaProgramming • • Dec 22 '24

Java Jive: Where Innovation Meets Code

Thumbnail
javajive.hashnode.dev
0 Upvotes

r/JavaProgramming • • Jan 10 '25

133 Java Interview Questions for 2 to 3 Years Experienced Programmers

Thumbnail
javarevisited.blogspot.com
4 Upvotes

r/JavaProgramming • • Jul 09 '21

Help

0 Upvotes

Hi! I did a java program and I need to install on a second computer to ensure the database connection is properly working. I know how to make an executable jar file on the main compuer but I just don't know how to create an installer for it so it can go on a different computer. Could someone guide me in this, please?


r/JavaProgramming • • Jul 22 '24

Java mentorü

0 Upvotes

Herkese selam, bilgisayar mühendisliği ögrencisiyim javada temel bilgim var . Javada gelişmek istiyorum.Mentör arıyorum. Lütfen yardımcı olabilir misiniz zor durumdayım.Gerekirse ücret bile verebilirim.


r/JavaProgramming • • Aug 21 '24

How to gracefully handle SQL in Java

Thumbnail reddit.com
0 Upvotes

r/JavaProgramming • • Sep 23 '19

Please help solving my homework!!

0 Upvotes

Hi, I have this homework due in 3 hours, please help if you're an expert..

[Weaving Numbers]

Write a java program that lets the user to enter any two integers and weave them digit by digit and print the result of weaving their digits together to form a single number. Two numbers x and y are weaved together as follows. The last pair of digits in the result should be the last digit of x followed by the last digit of y. The second-to-the-last pair of digits in the result should be the second-to- the-last digit of x followed by the second-to-the-last digit of y. And so on.

Thanks in advance <3


r/JavaProgramming • • Mar 26 '16

Complete Guide To Install Eclipse Java IDE Mars in Linux Ubuntu

Thumbnail
codingalpha.com
0 Upvotes

r/JavaProgramming • • Jun 27 '23

Get started with Spring Boot and Auth0

0 Upvotes

Learn how to add Auth0 to your Spring Boot application using the Okta Spring Boot Starter.

Read more…


r/JavaProgramming • • Feb 07 '25

IT tutoring

0 Upvotes

🎓 Struggling with Java or SQL? Let's Make It Easy! 💻

Are you finding Java or SQL a bit tricky? Don’t worry—I’m here to help you master these essential skills at an affordable rate!

💡 Why choose me?

  • Clear and concise explanations tailored to your learning style

  • Practical exercises to reinforce concepts

  • Personalized tutoring based on your specific needs

💸 Only 100 pesos per hour!
Whether you're a beginner or need help with more advanced topics, I’ve got you covered!

📅 Flexible schedules – you pick the time that works best for you!

Ready to boost your skills and ace those exams or projects? DM me on TG or Viber (09212427911) to schedule your session today! 🚀

#JavaTutoring #SQLTutoring #AffordableLearning #LearnWithMe #TechSkills


r/JavaProgramming • • Feb 09 '25

I wants to create project on mentor connect software

0 Upvotes

I wants to create project on mentor connect. On the name you can suggest me feature and can also dm for if you have code and for back end I want to use java and for front end html, css, javascript


r/JavaProgramming • • Feb 05 '25

Help, the recursive file is on my Windows 11 laptop

0 Upvotes

I was trying to create the .exe file from the java project in IntelIJ and used jpackage command in cmd for this. As a result, the file CarsAndBoomss (name that i made out) was created in which there is the file app in which there is the file CarsAndBooms. I can't delete it because i am informed by the Windows that the path to the file is very long (it's infinite and continues to be created). I tried to delete it with Power Shell and i downloaded IOBit Unlocker, i tried to restart the laptop but nothing works, second time i tried to point out the path in IOBit Unlocker it simple couldn't see the file. Help, it eats my memory!


r/JavaProgramming • • Mar 21 '21

Java GUI need help!!

0 Upvotes

Hello guys,

I need help from you!

if someone can make me source code for the same thing in the video that i will post down,its urgent for my assignment on academy.

https://www.youtube.com/watch?v=ZhBH35pD98c


r/JavaProgramming • • Feb 08 '21

How to Install Java?

Thumbnail
usemynotes.com
0 Upvotes

r/JavaProgramming • • Aug 06 '23

Thoughts on J Developer

0 Upvotes