Skip to main content

Questions tagged [spring]

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

Filter by
Sorted by
Tagged with
-2 votes
1 answer
777 views

I want to create the following distributed system: Spring back-end microservices containing the domain logic, a UAA (authentication) service, a Eureka service registry/discovery, a Spring Cloud Config ...
bhk's user avatar
  • 483
1 vote
0 answers
733 views

We have a few tables with a large amount of data and with indexes on those tables to help in faster retrieval. We are also using Spring Data JPA JpaRepository for adding data to those tables using the ...
phoenixSid's user avatar
0 votes
0 answers
78 views

I have 3 software components of a Web Application: 1. JS-client application 1 (JSApp1) 2. Java Spring (REST and Websockets) server app (SRV) 3. JS-client application 2 (JSApp2) My current task is to ...
Andrii's user avatar
  • 41
0 votes
2 answers
3k views

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 ...
James's user avatar
  • 285
2 votes
1 answer
2k views

I have a scenario where I can take a student Id as input via a part variable and return some data back as JSON objects where JavaScript handles the response as a part of AJAX call. Suppose the method ...
user1369975's user avatar
  • 1,319
4 votes
1 answer
451 views

I looked multiple places for some advice on how to solve this before asking this question, but I couldn't find something similar to this. So I have the following scenario in Java Spring Integration ...
dylan7's user avatar
  • 151
0 votes
1 answer
149 views

My project structure (Spring / maven): src / main / resources / application.yml src / test / resources / application.yml This is working well (when I launch test, it takes the test application.yml). ...
Tyvain's user avatar
  • 115
-1 votes
2 answers
204 views

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 ...
John's user avatar
  • 161
0 votes
1 answer
1k views

I have a legacy service that is running on-prem and have built a new service that runs on cloud which provides the same functionality. I have another java (spring) service which consumes the on-prem ...
Punter Vicky's user avatar
1 vote
2 answers
4k views

I have to rectifiy an application that basically serves content by using two REST endpoints. Both endpoints transfer files to the browser, one endpoint does so by providing the file in binary format, ...
Marged's user avatar
  • 235
3 votes
2 answers
5k views

Most of my work is written in Java using Spring Boot. In a recent project my entities contained no business logic, Spring Data was used to handle repositories and I have service classes that ...
SheppardDigital's user avatar
1 vote
0 answers
161 views

I "herited" a lot of Spring Boot code which is basically an asortment of REST Webservices. All those webservices are separated into an interface and an implementation and I find it hard get a grasp of ...
Marged's user avatar
  • 235
5 votes
2 answers
16k views

I wrote a websocket server in Spring Boot and a client in Javascript. These work fine. I also wrote a second client in Java. When this one attempts to handle a frame after connecting to the host, I ...
Jeff's user avatar
  • 1,874
0 votes
1 answer
1k views

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 ...
hvgotcodes's user avatar
0 votes
1 answer
201 views

We have one microservice that will be deployed on two different environments(A and B). There are some common fields and also some are specific to the environment. Example: SomeEntity for environment ...
Mehraj Malik's user avatar
1 vote
1 answer
1k views

Recently I am developing a new feature for my web application that must be Release Independent. The feature requires to show some predefined data. Those data will rarely be changed or updated. Here ...
Erfan Ahmed's user avatar
1 vote
0 answers
848 views

I have written a spring boot rest API application with OAuth.I have integrated swagger UI for API documentation. I want the API endpoints on swagger UI to be accessible without an access token. This ...
Curious's user avatar
  • 11
4 votes
3 answers
2k views

We are developing a tool from scratch based on a Spring backend and VueJs frontend. I am primarily working on the backend and came to know about the HATEOAS principle of developing REST APIs and ...
Sayak Mukhopadhyay's user avatar
2 votes
2 answers
2k views

Recently Ive seen so many devs working with the stack Spring/JPA and returning all these JPA entities on their rest controllers. In my opinion it's a BAD PRACTICE for several reason such: ...
carlos.hager's user avatar
1 vote
2 answers
1k views

I am doing a Java Spring-Boot backend project and I am implementing a controller-facade-service pattern on my structure. So is it best to put all my error handling on the facade layer, while the ...
alona's user avatar
  • 21
53 votes
1 answer
71k views

I am working on RCP application, I'm new to this application. Spring beans are used to write business logic to save/fetch entities. But, instead of sending entities directly to client we are ...
Naveen Kocherla's user avatar
1 vote
0 answers
908 views

Normally in java the RowMapper is placed in its own class. Instead, what about this design, putting the RowMapper inside each domain object, and giving all of them a consistent name: public class ...
Ariel's user avatar
  • 111
1 vote
0 answers
588 views

I have a large multi-module java/maven application where each child module is it's own java application and the root parent pom defines the standard dependencies pom.xml - parent pom - child1/pom.xml ...
emeraldjava's user avatar
5 votes
1 answer
753 views

Im working on the implementation of an IEC 62304 compliant development process in our company and I have a question considering SOUP (Software of unknown Provenance). Our goal is the develop a web ...
TardigradeX's user avatar
5 votes
3 answers
3k views

I'm working on building an API interface on-top of a domain-driven architecture. The domain layer has a bunch of specific exception classes (i.e. NameIsRequiredException, CannotPublishDraftException, ...
NRaf's user avatar
  • 311
2 votes
2 answers
2k views

Context I'm developing a Spring Boot java application. Currently it is a monolith with the rest API and the front end (vaadin driven) in the same big project. Although this is very easy to develop ...
Lucas Montenegro Carvalhaes's user avatar
-1 votes
1 answer
418 views

Currently I have an entity called Product with the respective ProductRepository and ProductService. For ProductService, I have tests for: Read (Covering Create too) Update Delete Besides achieving ...
0xFED5550's user avatar
  • 107
9 votes
1 answer
14k views

Let's say I'm building a Customer web application(in Spring Boot 2), which also exposes rest end points. I'm modeling my application into 3 layers. a) UI - CustomerDTO b) REST - ...
Sandeep's user avatar
  • 199
0 votes
2 answers
159 views

I am new in a team working on a grown and complex Spring MVC application. The application context is widely wired using @Autowire annotated constructors. This seems to be the main reason for the issue ...
rainer198's user avatar
  • 109
2 votes
1 answer
386 views

I was talking with part of my team about the responsibility for who own the Binding and Queue creation. We are using Spring framework. In async communication they agree that the responsability to ...
Dherik's user avatar
  • 2,504
0 votes
2 answers
424 views

From a REST API, we write to the database. We want to store who was the person that triggered this change. We have this information at the controller layer. The saving happens at the repository layer (...
Can't Tell's user avatar
  • 1,191
0 votes
2 answers
291 views

My team needs to design an API which sends objects to a queue in the cloud and retrieves objects from it. The data is inserted into the queue as byte[]. We have 2 ideas until now which I would love ...
Stav Alfi's user avatar
  • 297
0 votes
2 answers
251 views

Let's say I have a mobile client for answering questions and then purchasing a widget. For example, I might have 10 screens from my UI with about 8 questions per screen. Imagine there is a screen ...
berlinbrown2's user avatar
18 votes
3 answers
18k views

I'm torn between using DI and static utility classes on my code. I currently created a DateUtil static class that is only meant to be accessed statically. This class is responsible for just creating ...
mpmp's user avatar
  • 861
0 votes
2 answers
148 views

@Component public class RepositoryContainer { @Autowired public CommentRepository commentRepository; @Autowired public ItemRepository itemRepository; @Autowired public ...
cdxf's user avatar
  • 151
2 votes
2 answers
6k views

I am developing a REST API which accepts JSON using Spring Boot. I use Spring Security for authentication. I have a use case where I have two services, one to test connection to a 3rd party system and ...
Venkatesh's user avatar
3 votes
1 answer
21k views

My team is in dilemma, we have an existing maven spring-boot Java8 project with following onion architechture. controller --> service --> dao --> jpa repositories ...
Dave Ranjan's user avatar
8 votes
2 answers
40k views

The question is pretty straightforward, I'll try to explain why I want some explanations. (All of this is my 1½-year junior Java developer opinion, which may be more than incomplete. Which is why I ...
Yassine Badache's user avatar
2 votes
2 answers
2k views

For my personal project I need to store 2D shapes in a Postgres database. For example Circle, Pentagon, Rectangle and so on. At first I've done it like so: all shapes are inherited from an abstract ...
Zmur's user avatar
  • 133
0 votes
1 answer
785 views

If you want to implement a layered API design for example, you may have one API layer that represents the application layer. And I assume that the application layer is represented by an endpoint and ...
berlinbrown2's user avatar
2 votes
3 answers
548 views

Background As mentioned in this article, Inversion of Control can be achieved through various mechanisms such as: Strategy design pattern, Service Locator pattern(SLP), Factory pattern, and ...
user1787812's user avatar
3 votes
1 answer
2k views

In the tutorial I'm doing it uses interfaces to inject things, for example it uses a IHotDrink interface, then creates a Tea class that implements IHotDrink. It then has a third class called ...
Larvitar 's user avatar
7 votes
1 answer
4k views

I have a usecase where I am supposed to store entire payload from a third party API in addition to the DTO, say XYZDto, its translated to. There are two ways to achieve that - Translate the payload ...
comiventor's user avatar
19 votes
3 answers
8k views

Anemic domain model was criticized a long time ago by Evans and Fowler, since apparently it goes against object oriented principles, etc. The DDD community is clearly aligned with this statements. ...
codependent's user avatar
1 vote
1 answer
5k views

Let's take Spring web socket (with tomcat) for example. Does Web Socket blocks thread while keeping the connection between server and client? (For example, connection can last 2-3 hours). ( Does web ...
Teimuraz's user avatar
  • 492
-1 votes
1 answer
811 views

IOC principle can be implemented, using either: Dependency Injection Service locator pattern This article also supports these two approaches for implementing IOC principle. Spring IOC container is ...
user1787812's user avatar
1 vote
0 answers
2k views

In Hibernate ORM & Spring Boot, during the SessionFactory creation, SQL DML statements can be executed to create tables and/or insert data via files such as import.sql defined in the javax....
David Yee's user avatar
  • 111
5 votes
0 answers
2k views

I am new to Spring as well as layered architecture. So am a bit confused as how data flows among the different layers. What so far I have understood is: Layers: Controller (which accepts requests) ...
Jignesh M. Khatri's user avatar
2 votes
1 answer
7k views

I have an application that will allow the user to enter and store (in a DB) a website URL for a company. The only requirement (as of now) beyond entry of the website URL is to validate that the URL is ...
James's user avatar
  • 285
-1 votes
1 answer
3k views

I'm just designing the exception handling for the REST interface on our Spring server. As we will have multiple REST controllers, a central exception handling is desired. Spring offers the solution ...
Herr Derb's user avatar
  • 439

1 2
3
4 5
7