Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [spring]

Spring is a module based open source framework to build robust Java / Java EE applications.

Filter by
Sorted by
Tagged with
6 votes
3 answers
2k views

We currently have 3 Spring boot applications (with multiple instances across machines each) that communicate with an API via HTTP that is not in our hands. This API has a limit on a per-day as well as ...
Raildex's user avatar
  • 171
2 votes
2 answers
242 views

I have a complex process implemented in Java Spring microservice. Currently this process is triggered on user request and it is synchronously executed. This often results in a gateway timeout. ...
DimitrijeCiric's user avatar
3 votes
2 answers
493 views

I'm working on a Spring-based micro service project and considering different approaches for handling authentication and authorization. Instead of setting up a dedicated authorization server, I'm ...
GeekChap's user avatar
-1 votes
1 answer
220 views

Based on the documentation on Spring testing: https://docs.spring.io/spring-framework/reference/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions Annotating a test method ...
Rui's user avatar
  • 1,935
0 votes
0 answers
93 views

I am building an app where I have tenants and each tenant can have multiple users. The users can do multiple things in the application and these functionalities also are kind of independent from each ...
securita's user avatar
2 votes
2 answers
765 views

For the last few days I'm searching any information about compatibility of JPA and Clean Architecture/DDD. I found next ideas for decoupling application from hibernate. Do not use @ManyToMany or @...
AndyFlight's user avatar
3 votes
3 answers
1k views

I read about three-tier architecture and I have a question: I read that in business logic (that is, what is in logic tier) there should be POJO classes, but in most Spring manuals these classes are ...
dude34810's user avatar
1 vote
0 answers
83 views

Suppose I've got a spring controller as follows: ⋮ @RestController public class MyController { ⋮ @PostMapping(value = { "publicAPI/addItem", "internalAPI/addItem" }) ...
zZz's user avatar
  • 11
6 votes
3 answers
1k views

Currently, I am trying to implement these two architectures together with Java and Spring (although technology shouldn't matter I think). But I'm encountering problems getting them to work together. I ...
RuDaHee's user avatar
  • 171
0 votes
2 answers
398 views

I want to create an example application where we use a strict domain-driven design and layering (controller, service, repository). Most notably, we have a clear distinction between the domain and the ...
Gman's user avatar
  • 9
-3 votes
1 answer
128 views

I am new to backend REST API development. I am creating the CRUD APIs for books using spring boot. I have a model class lets say 'user'. It will have many fields, like id, name, email, status, ...
Nitish's user avatar
  • 7
-2 votes
1 answer
203 views

I'm implementing a software based on the micro-service architecture using Spring/Java. Each micro-service connects to either a PostgreSQL or a MongoDB database. Is it standard practice to have a ...
Amirhosein Al's user avatar
0 votes
1 answer
150 views

I have many repeated parts of service logic which just fetches object if it exists or returns a newly saved one. I want to move it from service because it just clutters up the logic. But I do not ...
DimitrijeCiric's user avatar
2 votes
3 answers
1k views

I am using the Spring Boot framework to create a RESTFUL API and I need a way to avoid the duplication of validation rules when using multiple DTOs as request/response objects for my endpoints. Using ...
Marco Pierre White's user avatar
-3 votes
1 answer
173 views

I am designing my next project, which will do various domain-specific tasks, but all that will be controlled and used via a generic crud web app. I have been professionally using Java with Spring for ...
rafal.sz's user avatar
2 votes
1 answer
734 views

Currently, all REST applications I work with have a three-layered architecture: Persistence -> Contains "entity" classes with JPA annotations / Spring Data JPA repositories Core -> ...
Lawrence Beutlich's user avatar
0 votes
0 answers
131 views

Please advise me what pattern to use in following case: I have a Java/Spring Boot application. There is a component with @KafkaListener method which receives Kafka Messages on CRUD of various subject ...
ALZ's user avatar
  • 107
0 votes
1 answer
132 views

In a Java Spring API, I'm implementing GeoJson Conversion Service to convert different types to geojson, I have GeoJsonConversionService interface, and one implementation is ...
zaydoosh's user avatar
  • 103
1 vote
1 answer
667 views

When implementing projects in Spring Boot (especially CRUD applications), I often find myself writing a lot of repetitive code that just calls functions and services from lower layers. For example, ...
Win32's user avatar
  • 13
1 vote
4 answers
1k views

I am using spring boot with mongo db (azure cosmos db) in my microservices. Currently I have an Orders collection that stores Orders. These documents have a field userId that is null when the document ...
Andre Silva's user avatar
0 votes
0 answers
584 views

According to Should I use a layer between service and repository for a clean architecture - Spring the Peristance layer is deprecated because the Repository is already an abstraction. UML solution of ...
Adri's user avatar
  • 111
0 votes
1 answer
3k views

I have a Spring Boot REST API application that uses different profiles like dev, test, prod, etc It also makes a call to another API to retrieve some data like: Client ---> MYAPI ---> ...
dbnex14's user avatar
  • 119
-1 votes
1 answer
62 views

I have one design problem for one of my projects based on location tracking. The scenario is I have multiple devices(for some business) all over the city and have GPS installed inside, the device is ...
Praveen kumar's user avatar
0 votes
2 answers
777 views

I am working on a small project with microservices architecture in Spring Boot. As to not make unnecessary calls to users-microservice, I have duplicated some necessary User data (id, name, summary, ...
don's user avatar
  • 1
-1 votes
1 answer
301 views

How to expose an API using the traditonal request-response style while internally it handles it in event driven way (pure or partially event driven), given that if callback style may not be possible ...
once's user avatar
  • 109
-1 votes
2 answers
146 views

I have a few basic questions on how to implement an API for a basic e-commerce system. The relevant entities are Customer, Puffle, and Review. Each Puffle can have zero or more Reviews. Each Review is ...
Richard Robinson's user avatar
0 votes
1 answer
45 views

At our company, we have multiple products which share authentication settings. In particular, we use Spring LDAP, but since our use case and configuration is more complex, we would like to use ...
JohnEye's user avatar
  • 300
0 votes
1 answer
135 views

I am creating a web application which has three distinct components as far as I understand. A Nuxt frontend, and Spring Boot backend and Google OAuth2 for authentication using OpenID Connect. Nuxt can ...
DGrinbergs's user avatar
1 vote
4 answers
1k views

I have a service class that performs some operations. One of the operations is a piece of code long enough to warrant extracting to a new class and unit test it in isolation: @Service public class ...
KidCrippler's user avatar
0 votes
0 answers
117 views

I have two micro services built using spring boot, One micro service is: "payment" Which handles actions related to payments. Like creating a payment link. Getting the latest status of ...
aravind's user avatar
  • 101
2 votes
3 answers
391 views

I have a simple app for storing the movies, that exposes REST API. I am using spring-boot. I am using this simple app as an example, however, the question is more about general good practice. I am ...
Darlyn's user avatar
  • 227
0 votes
0 answers
121 views

I'm creating an authorisation service, which does signing using a key. For local development I was randomly generating a key on application start-up. Now I'm deploying to the cloud (currently going ...
Tobi Akinyemi's user avatar
2 votes
1 answer
3k views

Spring Boot/Java 8/MySQL here. I have a widgets table in my MySQL DB that is modeled by a JPA entity like so: @Entity @Table(name = "widgets") @Data public class Widget { @Column(name = ...
hotmeatballsoup's user avatar
0 votes
3 answers
1k views

Is it an anti-pattern to extract common configuration code as a library and reuse it across microservices? I am breaking down a monolith app into a few of microservices. What I stumbled upon is: since ...
pjoter's user avatar
  • 37
0 votes
4 answers
2k views

I have single page application with an Angular frontend and a Spring REST-backend. What is the proper way to handle a list of string-based options in the fronted the enduser can select from, which ...
yorika90's user avatar
0 votes
3 answers
336 views

I'm working on a project where I need to do CRUD operations on Book and Library objects. Naturally the relationship between Book and Library is Many to One, like so: @Entity @Getter @Setter @...
hfg124g76g1's user avatar
4 votes
1 answer
2k views

The motto of the upcoming question is "I don't know what I don't know". I would like to know if there are downsides or security risks with an authentication implementation. Right now, I'm ...
Bennett Dams's user avatar
0 votes
2 answers
1k views

We have to make a bunch of HTTP calls from Java/Spring-Boot application which will be mix of in-sequence and parallel. Level 1 : We make 3 parallel calls to Services 1 , 2 and 3 Level 2: After service ...
Smile's user avatar
  • 111
0 votes
0 answers
288 views

I have a web application like this: An angular frontend for client and a spring MVC backend for admin panel. A angular web application requests a JWT token from tomcat/spring MVC. The angular ...
desertSniper87's user avatar
0 votes
1 answer
481 views

We have a Spring-Boot Web application currently deployed to 7 environments (DEV, SIT, UAT, Pre-Prod, Prod, etc.). This application connects to other REST services, which has different URLs for each of ...
Smile's user avatar
  • 111
-2 votes
2 answers
215 views

I'm on the way to build a modular Java web project with some pluggable modules - like Jira and Confluence for example. My first thought was to build a project with Spring and OSGi, I started finding a ...
Jonas Kahn's user avatar
2 votes
4 answers
2k views

Recently In an interview I was asked this question - Question- If are storing passwords in encrypted format in DB and in future when user login into our website how will we perform authentication? Me:...
Loren's user avatar
  • 147
0 votes
2 answers
562 views

I know various forms of this question have come up before, but none of them quite seem to answer in a way that I can apply to / understand in relation to what I regularly see others doing. ...
SvenskNavi's user avatar
0 votes
1 answer
303 views

This is more specific to spring boot projects and applications whose main USP is its APIs. Now that we can simply create a JAR file deploy it anywhere, what is the point of WARs? Is there a specific ...
rsp's user avatar
  • 143
0 votes
1 answer
670 views

I'm planning to start a new Spring Boot project with MongoDB. I'm very familiar with Spring Boot, but all of my past projects used MySQL. Each of my projects has the following directory, that holds ...
Maroun's user avatar
  • 103
0 votes
0 answers
90 views

In my country, there is a high number of fraudulent doctor's sick letter as they are manually written on paper. I'm designing a web application to combat this issue and have the whole process ...
Siya Stoan Sosibo's user avatar
2 votes
0 answers
582 views

I work for an organization that heavily leverages AWS. There is a strong push that every team move from containers deployed on ECS to leverage AWS Lambda and step functions for (almost) every project....
greenJavaDev's user avatar
1 vote
1 answer
737 views

My goal is to collect/publish different types of information from the application. We use Kafka for the event bus. Consider the following sample code. class UserService { public User ...
Muztaba Hasanat's user avatar
3 votes
1 answer
6k views

In a typical Java Spring Web APP: we have the following layers: Model [DB Models] Repositories [where you have queries to DB] Services [Business service where you have the @Transactional annotation] ...
Youans's user avatar
  • 501
2 votes
0 answers
177 views

I have a maven module which will handle DB interactions for various scenarios. I want this module to use spring framework so we can leverage the standard DI and integration test capabilities. This ...
emeraldjava's user avatar

1
2 3 4 5
7