Questions tagged [spring-boot]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

Direct communication between message-based bounded context

My project comprises of serveral bounded context which communicate with each other with RabbitMQ The front end of the project is written in C# and the backend is in Java. The RabbitMQ communication ...
2
votes
1answer
34 views

Refresh tokens by example using Angular and Spring Boot

I am designing out an app that would have an Angular frontend and Spring Boot (Java) backend. I was considering (but not married to) the prospect of JWT-based authentication: User logs in with ...
1
vote
2answers
72 views

Can DTO have helper method that operates on DTO fields?

I wonder where to add method that reads my dto WindowDto.getPath().getPoints() and based on this collections returns some value (that value will be needed in some different srevices in my app): public ...
-4
votes
0answers
22 views

Techniques for exposing a rest APi under development to a cloud hosted project also under development?

My specific scenario is I have a Spring boot based rest API published to a development server behind our firewall. Another team is developing a website on a cloud hosted Drupal system. They want to ...
0
votes
1answer
30 views

Spring Boot + MongoDB project structure and database creation

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 ...
0
votes
0answers
65 views

Spring boot, n-tier layer structure naming conventions

I am currently developing a huge project in my company with N-Tier Layer architecture using spring boot but I can not sure about the package and class namings. In our project, we have a complex ...
0
votes
1answer
47 views

Normalize timestamp values or have multiple SQL queries

I have a Spring Boot application to implement a RESTful API. One of the GET requests have two query parameters: from and until (of type date). Those parameters are optional, so user-agents can send ...
0
votes
0answers
58 views

Single DB - Multitenancy with microservices

We are migrating from a monolith to microservice. Note : We store the tenant details in master tenant db which is seperate from the application database As-is: The app serves multiple tenants and has ...
1
vote
0answers
17 views

Reusable module using spring framework with spring-boot application modules?

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 ...
-2
votes
1answer
78 views

Handling Legacy Database with Spring Boot Java

We are given a task to create an Web Service API for a mobile application. The problem is we have to use a legacy database that is not normalized and its very tedious to work with. We are accustomed ...
1
vote
0answers
41 views

Multitenancy - Multischema DB and should we handle by individual microservice basis?

I am looking into the revamping my organization's application by moving from a monolithic into a microservice-architecture. My database is a multi-schema shared in one database. Each of these schemas ...
-1
votes
2answers
113 views

Common library for classes and communication between microservices?

I have been working on a project that is being built around a microservices architecture. We are thinking on using a message broker, such as RabbitMQ, for both synchronous (via RPC) and asynchronous ...
0
votes
1answer
63 views

Implementing a user ID system like Discords for a web app using Java Spring, JPA, Hibernate and MySQL

I’m trying to create a web application with a forum and user profile along with other functions. However I’m thinking about how I might implement an ID for each user. The best way I’ve seen other ...
0
votes
2answers
136 views

How to share entity classes (JPA) among projects, where not all have DB access?

So, I have project in which several WebServices will be created (REST). For the sake of simplicity, Lets name them A, B, and C. A and B handle different tasks, but both of them consume C, which is the ...
0
votes
0answers
10 views

Scale spring-batch instances executed from within a web container

I am re-designing our current ETL for file ingestion where spring-batch containers will be deployed on Kubernetes. Each file type is processed by a different job, which will be triggered on demand via ...
0
votes
0answers
114 views

Eureka cluster for service registry with only one IP address

I want to use the Eureka cluster with service discovery. As it said in the documentation, Eureka's nodes can share their state with other nodes. If one Eureka node fails, others still have all ...
-4
votes
1answer
140 views

Springboot (Java) - Is mandatory for BDD the use of Cucumber?

I was wondering if its a requirement to consider BDD the use of Cucumber framework or other framework of test abstraction. Because I was playing around with @SpringbootTest and TestContainers(both ...
-4
votes
1answer
52 views

application can not handle certain amount of RPS when 3k+ sessions connected

i have a problem in my scalable Pub/Sub application that it can not take more than 30 RPS when big amount of sessions are open against it. first i will explain the application structure. the ...
0
votes
0answers
32 views

Spring JPA shared repositories - do I need an intermediary data access point?

I am developing multiple Spring Boot projects that share the same DB, and therefore Entity and Repository classes/interfaces. The Entities and Repositories are stored in a "common" library so that one ...
0
votes
1answer
72 views

Is an antipattern returning differente objects in a single rest method?

I have seen around the Internet several rest web services with the following behaviour. In case there are any errors, they return a Error object, otherwise they return, say, MyClass. See the ...
0
votes
0answers
123 views

Aggregate small spring-boot REST services into a big one as dependencies

I have build several small REST services based on spring-boot. Each of this REST service has an own database, own configuration and can run independently without the other services. Each service is ...
-1
votes
1answer
2k views

Is it okay to have one Service with two different Repositories in Spring Boot MVC?

I have a backend Spring Boot API that should have one(?) endpoint that returns some statistics to display in a frontend. These statistics are calculated from data that comes from two different ...
1
vote
2answers
100 views

How to design a process and use the business rules for sending alerts/notifications

Currently working on designing a process which demands me to send alerts like email notifications to the users which meet a business criteria(we can also call business rules). I want to make this ...
1
vote
0answers
17 views

Spring Security SAML and RSA session

This is probably a design/architectural question. My app uses RSA initiated SSO using SAML for authentication and from there on my app uses its own session to manage the request. There is a flaw in ...
-1
votes
1answer
454 views

building a frontend for a microservice backend: architectures? (spring boot stack)

to summarize a bit my current situation: I am building a backend based on microservices using spring boot. These are aggregated behind an api-gateway. My intention is to consume these api's from both ...
0
votes
0answers
72 views

oauth2 + angular - Most elegant way to pass the JWT auth token

I have an angular application, which is querying an API as a client (written on Spring Boot 2.2.1 + Spring 5.2.1) that supports 3rd party authentication over OAuth2. The API has altogether 3 different ...
1
vote
0answers
258 views

Design of Spring boot endpoint that returns large amount of data continously until complete

I'm developing a web application using Spring Boot and React, that needs to return information about hotels from different cities: As an input of the controller, I receive a list of cities that can ...
0
votes
2answers
118 views

Microservices: how far should coupling / decoupling of application parts relying on the same data backends go?

I am in the process of migrating a pretty much monolithic PHP application to microservices. With the development pipeline, docker containerisation, CI/CD and scalability in mind, what would be the ...
-4
votes
1answer
1k views

What do you think about DTOs in Spring Data JPA project?

First of all, I am not a junior programmer. I'm just looking for best-practice. How do you use entities and DTOs into your Spring Data JPA projects? Assume there is our layers: Repositories (as ...
2
votes
3answers
88 views

A question on microservice boundaries around monitoring

I have a microservice, lets call it microservice A. It talks to another microservice's REST endpoint, lets call that one microservice B. I'm monitoring the health of microservice A using the ...
-2
votes
1answer
59 views

Property file, annotations or database tables for storing configurations

Which one is better property file, annotations or database tables for storing configurations related to a program? What are the advantages/disadvantages and what use cases are best suited for each ...
0
votes
1answer
64 views

To And From Date Validation in Model

In my Springboot project I need to perform a validation of the type validFromDate<validToDate. I was wondering whether would it be a good or bad practice to place a validation in the model itself (...
0
votes
1answer
990 views

In a Spring Boot Project, would you use interfaces for entities or not?

I am currently on the decision, whether to use interfaces throughout my whole spring project or not. I scouted some open source projects and saw, that many big projects are handling that quite ...
2
votes
0answers
106 views

Send push notifications from ActiveMQ

I am trying to figure out how to send push notifications back to the client in the following ActiveMQ scenario: I have a spring boot web application #1 deployed on tomcat on RHEL server. From the ...
1
vote
2answers
256 views

How to abstract the data layer when using Spring Data?

I have decided to try to create my own board game implementation. Probably going to use a REST-api to expose the contract. I'll figure out what database, communication, ... tools I'm going to use once ...
4
votes
1answer
1k views

Spring Boot - What is the purpose of Autowired Constructors?

I’ve been developing in Spring Boot for just over a year but have yet to understand the benefits of using an Autowired constructor and I was wondering if someone could explain this to me and what ...
2
votes
2answers
2k views

Spring Boot REST Java Microservice: Why Use Maven Submodules?

I have seen a project which uses Maven submodules. The project itself is a spring boot application that exposes Restful API endpoints for a microservice ex: Customer Service (getCustomers, ...
-1
votes
1answer
209 views

DDD persistence through non-orm tools in java

So our domain model drove our database and ORMs worked for DDD implementations. Now the tables have been altered a lot and as a consequence ORM impedence is too much in our domain model to use ...
-1
votes
2answers
90 views

User friendly webapp configuration

I'm planning to develop a web application that would run on-premise at the customer. I'm quite unsure about the whole process of setting up the site in a user-friendly way, but mostly disturbed by the ...
-1
votes
1answer
236 views

Pattern for for REST API who's response depends on behavior of requests to other services

Some one help me with my design paralysis! Assume a microservice (probably going to be implemented in Spring Boot) that has implemented an run of the mill REST API, and after receiving an initial ...
0
votes
0answers
78 views

How can I create a spring-boot application which can be easily extended with plugins?

I am planning a spring boot application that can be extended with plugins. However, I haven't found out yet whether spring boot meets my requirements in this regard. I imagine the following folder ...
1
vote
1answer
114 views

Spring Boot Controller Unit Test Strategy

All of the controllers in our project are as dumb as we can make them. Rightfully so, they simply validate the incoming payload, hand the request over to a service layer, and return whatever response ...
6
votes
2answers
3k views

Should I validate dtos or entities? [closed]

I want to place validation in one layer for the reason of simple code maintenance. I was thinking of entity validation, cause this protects directly database. Am I right, or should I add validation ...
0
votes
2answers
1k views

Using Spring Boot's @ConfigurationProperties without violating Law of Demeter

My apps commonly have one or more prop holders. These holders contain config data used in the app such as: @Component @ConfigurationProperties(prefix="app.orders") @Data //lombok public class ...
5
votes
3answers
3k views

Is it a good idea to share repositories across microservices in Spring Boot Application?

We are migrating a desktop application into web based Spring Boot micro services application with a client imposed mandate of using their existing MySQL database, so all micro services share a common ...
-1
votes
2answers
130 views

Dealing with data download which could take days to download

I have a situation on the front end where a user clicks on “Download” button and the query behind the scenes is going to take over a day. I have a Spring boot web app running as far as web services ...
1
vote
0answers
58 views

How to build Spring Boot multimodule app build to separate WARs and shared library/dependencies?

Currently, I'm trying to migrate multimodule angular + spring 4 app build with ant and ivy to Spring Boot and build it with Gradle. The issue is that I don’t how to create build upon some custom ...
0
votes
1answer
290 views

Best approach for web service that calls other web services

The scenario is: client makes request to server A Server A makes potentially multiple requests to server B. Edit to clarify, server A makes the requests concurrently using Futures. Server A blocks ...