r/SpringBoot • u/aarkay89 • Mar 19 '26
r/SpringBoot • u/Delicious_Detail_547 • Mar 19 '26
How-To/Tutorial Safer Java Without Rewriting Java: Meet JADEx
JADEx (Java Advanced Development Extension) is a safety layer that makes Java safer by adding Null-Safety and Final-by-Default semantics without modifying the JVM.
- GitHub: https://github.com/nieuwmijnleven/JADEx
- Tutorial
Null-Safety
NullPointerException (NPE) is one of the most common sources of runtime failures in Java applications.
Although modern Java provides tools such as Optional and static analysis, null-related bugs are still fundamentally a runtime problem in most Java codebases.
JADEx addresses this problem by introducing explicit nullability into the type system and enforcing safe access rules at compile time.
In JADEx:
Type→ non-nullable by defaultType?→ nullable?.→ null-safe access operator?:→ Elvis operator (fallback value)
This design ensures that developers must explicitly acknowledge and handle nullable values before accessing them.
For example:
String? name ;
String upper ;
When compiled by JADEx, this code is translated into standard Java:
JADEx compiles null-safe expressions into standard Java using a small helper API(SafeAccess).
String name ;
String upper ;
In this example:
name is explicitly declared as nullable.
The ?. operator safely accesses toLowerCase() only if name is not null.
The ?: operator provides a fallback value if the result is null.
Instead of writing repetitive null-check logic such as:
if else
JADEx allows the same logic to be expressed safely and concisely.
Most importantly, JADEx prevents unsafe operations at compile time. If a nullable variable is accessed without using the null-safe operator, the compiler will report an error.
This approach shifts null-related problems from runtime failures to compile-time feedback, helping developers detect issues earlier and build more reliable software.
Readonly (Final-by-Default)
JADEx also introduces optional readonly semantics through a final-by-default model.
In large Java codebases, accidental reassignment of variables or fields can lead to subtle bugs and make code harder to reason about. While Java provides the final keyword, it must be manually applied everywhere, which often results in inconsistent usage.
JADEx simplifies this by allowing developers to enable readonly mode with a single directive:
apply readonly;
Once enabled:
-
Fields, local variables, and parameters become
finalby default -
JADEx automatically applies
finalwhere appropriate -
Reassignment attempts are reported as compile-time errors
Example:
apply readonly;
Since count is generated as final, the reassignment results in a standard Java compile-time error.
If mutability is intentionally required, developers can explicitly opt in using the mutable modifier:
private mutable int counter ;
This approach encourages safer programming practices while keeping the code flexible when mutation is necessary.
When compiled, JADEx generates standard Java code with final modifiers applied where appropriate, ensuring full compatibility with the existing Java ecosystem.
//apply readonly;
Summary
JADEx introduces two complementary safety mechanisms:
Null-Safety
-
Non-null by default
-
Explicit nullable types
-
Safe access operators (
?.,?:) -
Compile-time detection of unsafe null usage
Readonly (Final-by-Default)
-
Final by default
-
Explicit opt-in for mutability
-
Automatic
finalgeneration -
Prevention of accidental reassignment
Together, these features strengthen Java’s type system while remaining fully compatible with existing Java libraries, tools, and workflows.
JADEx does not replace Java.
It simply adds a safety layer that makes Java safer while keeping full compatibility with the existing ecosystem.
r/SpringBoot • u/garlicbread_sticks • Mar 19 '26
Question Any good source (YouTube or video preferably) to learn Rabbit MQ integration in SpringBoot project ?
I have been trying to figure out all the functionality of RabbitMQ and how to use it in a projcet. I understand how normal queues can be implemented but am having trouble in its dlq, idempotency and advance topics' implementation.
r/SpringBoot • u/Familiar_Category893 • Mar 19 '26
Question How deep should backend engineers go into data engineering and DevOps?
reddit.comr/SpringBoot • u/EducationalCoast7708 • Mar 19 '26
Question Can anyone help me to solve this problem in springboot
Is their is any possible to add submodule from git before configuration phase as I am mentioning the submodule in setting.gradle.kts but it shows the error that submodule doesn't exist. Normally I add submodule before compilation phase using task in build.gradle.kts file
r/SpringBoot • u/A_little_anarchy • Mar 18 '26
Discussion Would you switch from ShedLock to a scheduler that survives pod crashes and prevents GC split-brain?
Working on a distributed scheduler for Spring Boot that solves two problems ShedLock cannot.
Problem 1 - GC split-brain. ShedLock uses TTL locks. If your pod hits a long GC pause, the lock expires, another pod takes over, first pod wakes up and both run simultaneously. Both writes accepted. Data corrupt. This is a documented limitation, ShedLock’s maintainer has confirmed it cannot be fixed within the current design.
Problem 2 - No crash recovery. Pod dies halfway through processing 10,000 invoices. Next run starts from invoice 1. Duplicate charges, lost work. For weekly jobs that means waiting a full week.
The fix is fencing tokens - every write must present the current lock token, stale writes are rejected at the database level - combined with per-item checkpointing. Pod crashes at invoice 5,000, the replacement pod resumes from invoice 5,001, not from the beginning.
Have you hit either of these problems in production? And would you actually use something like this, or is making your jobs idempotent good enough for your use case? Honest answers only, trying to understand if this solves a real problem before I publish anything.
r/SpringBoot • u/kubelke • Mar 18 '26
Question What are your ways to handle unknown and complex JSON objects?
Hey there,
from time to time I'm have to deal with complex and unknown JSON structures. I'm wondering how you deal with them. So far I have been using Map<String, Object> but it's getting annoying to see all those unchecked type warnings, and suppressing them feels wrong. We are talking about really custom JSONs for which it's impossible to create class types (e.g. to handle user metadata that can be anything for whatever reason)
I'm thinking of switching to something else. For now, I see these options:
- ObjectNode (Jackson) - best option? Easy to use, get data and create JSONs
- JsonNode (org.json) - seems to be the worst option?
- JsonPath (com.jayway.jsonpath) - , seems to be good option when you want to just get data from very long path, but not for building JSONs)
- GSON (Google) - tbh I used it only a few times for some dirty jobs
Maybe there is something better out there that I don't know? ObjectNode seems to be the best option since Jackson is heavily used in Spring Boot, but I wonder if are there any downsides of using it instead Map<String, Object> or other options.
Do you have any experience with using any of them in the long term?
r/SpringBoot • u/paszeKongo • Mar 18 '26
News Java 26 Is Out — Here's What Actually Matters for Spring Boot Developers
r/SpringBoot • u/leetjourney • Mar 17 '26
How-To/Tutorial How to set routes in an API Gateway
Check out my latest video where I show how to build an API gateway in Spring Boot 4 and how to set routes so that the api gateway acts as a proxy:
This is the 9th part of a series where I build a Home Energy Tracker microservices project. I hope people will find it useful
r/SpringBoot • u/Crazy_Ebb_4828 • Mar 18 '26
Question Discussion
one thing why to prefer constructor injection using lombok why not autowired and if its not sou much used then what is the use case of autowired then bcoz in gpt when i gjve code it always suyggests to make constructors.
secondly asking about superbuilder like what is the reason that parent class also must be annoted with super builder because normaly in inheritance only child class needs the super() or if not jvm invokes it implicitly but parent doesnot need anything like that
r/SpringBoot • u/Character-Grocery873 • Mar 17 '26
Discussion First project
My first whole project using Spring boot, any suggestions, feedbacks and corrections are appreciated
r/SpringBoot • u/webdev231 • Mar 17 '26
Question Multiple tables and pages
Hello all,
I’m a beginner learning Spring and Java. I’m familiar with Peoplesoft architecture which uses old Java programming using JDBC techniques behind the scenes. I have created basic CRUD using Spring boot and React. Question is: if there is a complex page that has to manipulate data from and into multiple database tables, how would you do that in Spring/Java?
I enrolled into a course and this has not been covered.
Appreciate your help and insight!
r/SpringBoot • u/Interesting_Path7540 • Mar 17 '26
How-To/Tutorial Spring AI 2 Audio and Image
Hi everyone, check out my new post about Audio and Image with Spring AI 2: The Java Prompt #3
r/SpringBoot • u/paszeKongo • Mar 17 '26
How-To/Tutorial Spring Boot @Transactional: 5 Bugs You're Probably Shipping Right Now
r/SpringBoot • u/kharamdau • Mar 17 '26
Question Are teams actually reviewing their CI pipelines, or just copying them?
I’ve been looking at PR verification pipelines across a few Spring Boot services recently, and one pattern keeps repeating.
The pipeline is almost always copied from another service.
Same GitHub Actions workflow, same permissions, same setup steps.
It “works”, tests pass, PRs merge.
But when I look closely, it’s carrying things that were never really questioned:
- GITHUB_TOKEN with write permissions (contents, packages) even for PR builds
- Actions referenced by floating tags instead of pinned commits
- Integration test reports not being surfaced in PR comments
- Placeholder configs like `my-comment-header` still in production
None of these break the build, but they change what the pipeline is actually doing, especially from a security and observability perspective.
One thing that stood out to me is how CI is treated differently from application code. We review business logic, we audit dependencies, we run SAST tools. But the CI pipeline which runs code with credentials is often treated as “just config”.
Curious how others approach this.
Do you:
- Review CI workflows line by line like application code?
- Enforce least-privilege permissions on GITHUB_TOKEN?
- Pin actions to commit SHAs?
- Run workflows locally (e.g., using act) before pushing?
For context, I wrote a deeper breakdown of the approach here:
https://mythoughtpad.vercel.app/blog/stop-lying-to-your-ci-pipeline
r/SpringBoot • u/Proud_Yesterday6627 • Mar 16 '26
Question Suggest some resources/books to read to improve my knowledge
I'm currently in 3rd year of uni and applying for internships. I do have some projects which I plan to deploy after buying a domain but they are working very slow while testing with lots of data and concurrent users. My stack is Java + Spring so i tried playing around with Hikari Pool connections and Cache a bit but I don't know how to optimally use it. Please give your inputs and suggest some resources and books if possible.
Also, i tested it via K6. I did upload files to AI but it is hallucinating. Even with cache and changing db connections is only giving a small improvement. I also learnt the 2 db queries in one method is bad design and bad performance so i optimized to 1 direct db call so that improved the performance a bit too. So any input on this?
r/SpringBoot • u/PainterOk2272 • Mar 15 '26
How-To/Tutorial What prerequisites should I know before learning Spring/Spring Boot?
I’ve already learned core Java, JDBC, and multithreading.
Before I jump into Spring or Spring Boot, what other fundamentals should I make sure I understand well?
Are there specific concepts, tools, or Java features that would make learning Spring much easier (for example: Hibernate, Beans, servlets, etc.)?
Would appreciate suggestions from people who’ve already gone through this path.
r/SpringBoot • u/Famous_Classic3355 • Mar 16 '26
How-To/Tutorial Anyone interested in joining Spring Boot Free Live Workshop?
bugstate.inr/SpringBoot • u/himanshu20898 • Mar 15 '26
Question Struggling to Transition from Support Role to Spring Boot Development
I have been working as a software engineer, though more in a support role, for the past five years. Unfortunately, I have been confined to a support project with no hands-on experience in coding, building, or maintaining Spring Boot applications. When I first joined, I had never even heard of Spring Boot, but during my initial three months, I underwent training and found it quite easy to understand. However, since I have not written a single line of code since then, I feel stagnant in my career and struggle in interviews, as my five years of experience do not reflect actual development skills.
I have attempted various methods to re-learn and build Spring Boot applications, including revisiting my original training course, watching tutorials, and seeking help from AI tools. While I have a solid grasp of the theoretical aspects of Spring Boot because of AI, I still face significant challenges in practical implementation. For example, I cannot create even a simple employee management system without relying on tutorials or AI assistance.
What I really want is to learn how to build applications independently and gradually move from monolithic architectures to microservices. Could you suggest effective approaches, structured courses, or strategies to bridge this gap between theory and practice?
r/SpringBoot • u/AlarmOpening2062 • Mar 15 '26
Discussion This is a thank you post
About a month ago I posted this project and it received a lot of support. Thank you all! The project is still here; I'm leaving it here in case anyone missed it. Have a great day!
r/SpringBoot • u/Optimistabtfuture • Mar 15 '26
How-To/Tutorial Roadmap for Springboot
I am a complete beginner in learning springboot.
Java basics Good in logic building in DSA Completed IOC , DI
Now trying to find a perfect and simple roadmap to learn springboot
Everyone is saying too much mixed paths which becomes too much complex and confusing.
Please help
sometimes I feel I am very dumb to learn springboot and I won't be able to learn it.
Please suggest in a way it should be doable and not very complex / confusing
Please help
r/SpringBoot • u/Competitive-Image961 • Mar 14 '26
Question Suggestions!
I have recently learned spring boot and made a project on that, I want more suggestions on projects that will provide me more detailing as I learned more by doing. Also I am facing lot of issues on spring Security so is there any source from where I can understand spring security.
And the company where I am interning currently have some jsp code in the backend so i wanted to know should I learn servlet jsp too ? And if yes please suggest me sources.
r/SpringBoot • u/Remote_Adagio1531 • Mar 14 '26
Discussion Project Idea
I want to create a project in spring boot + react(js) + cloud + aiml integration. Can anyone suggest some project ideas that I build
r/SpringBoot • u/Swarali_04 • Mar 14 '26
Question Spring mvc question
Is it necessary to learn spring mvc before springboot or we can directly start with springboot?