Questions tagged [spring-boot]
The spring-boot tag has no summary.
93 questions
3
votes
1
answer
256
views
Where should I store the access token in React?
I'm building a web app using Spring Boot (backend) and React (frontend).
My authentication is based on JWT, with both access token and refresh token.
The refresh token is stored in an HTTP-only ...
1
vote
4
answers
170
views
Is it good practice to return ApiResponse from a Spring service layer?
I'm working on a Spring Boot application with a VoucherService and VoucherController. I currently have the service method return an ApiResponse<T> directly, like this:
@Transactional
public ...
0
votes
1
answer
222
views
How should ViewModels and Services communicate in a JavaFX + Spring Boot MVVM application?
I'm building a JavaFX + Spring Boot application using the MVVM pattern.
I’m building a generic “wizard” in a JavaFX + Spring Boot MVVM app. A WizardViewModel drives a sequence of steps (STEP_ONE → ...
1
vote
2
answers
252
views
Is Spring Boot Unit Test Coverage with Integration tests only a bad practice?
I have recently come across a few codebases at work where the previous developers chose to reach the >80% coverage criteria by writing only integration tests with the @SpringBootTest annotation ...
1
vote
1
answer
100
views
Handling order Id In OMS system on application level [closed]
Situation: Order Handling in OMS System: In my OMS system, orders are pushed from an online platform with a unique orderId.
Since the orderId is generated by the online platform, I cannot make it auto-...
1
vote
0
answers
84
views
Best practice: slightly different logic on multi mapping endpoint
Suppose I've got a spring controller as follows:
⋮
@RestController
public class MyController {
⋮
@PostMapping(value = { "publicAPI/addItem", "internalAPI/addItem" })
...
2
votes
3
answers
696
views
Is there a way to avoid a lot of calls to other microservices from one single service request?
I'm developing a Microservices Web Chat Application using Spring boot and Websockets.
Right now my concern is the following: it seems like each one of my microservices need to make a lot of calls to ...
-3
votes
1
answer
129
views
How to format request and response
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, ...
3
votes
2
answers
435
views
Populating Cache in microservices
These days I was asked by our technological leader to populate a cache.
The exact nature of the request impacts a back-end (BE) system that operates on a database through a client library.
The BE is a ...
-2
votes
3
answers
323
views
How do I build my application with high throughput in mind? (Need guidance)
I am building a Spring boot REST API app that is part of a microservice architecture project. What I am planning:
My app listens for events from two other services and after some business logic, ...
1
vote
2
answers
814
views
Handling Distributed Transactions with CompletableFuture in Spring
I'm looking for an opinion about an approach for dealing with distributed transactions. In a Spring Boot program, how can I implement the following business process without sacrificing to code ...
2
votes
3
answers
1k
views
How can I avoid duplicate annotations when validating both Entity and DTOs?
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 ...
6
votes
5
answers
8k
views
What to cover with integration tests?
I'm working on adding unit/integration tests to an existing project (Java/Spring Boot) and I've been investigating on how they are "separated" in order to cover the test cases and how to ...
0
votes
0
answers
302
views
better structure of a software project to prevent circular dependencies
I am contacting you today regarding a recent problem with circular dependencies. It's about a Spring boot application that accepts data via a Rest API and then forwards it to an internal Spring ...
-1
votes
1
answer
1k
views
Microservices architecture for spring boot application
I have a Spring Boot application which is containerized. The application has become huge with lots of complications and its difficult to maintain it. So I am thinking of breaking it into microservices....