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

learn more… | top users | synonyms

0
votes
0answers
14 views

Should Microservice still use web framework such as Spring

My understanding of Microservice architect is that much of the work is shifted to the front end client side in a single page application (SPA). The SPA will then interact with the back end ...
0
votes
1answer
39 views

Decoupled architecure between business and data layers in Spring JPA / Hibernate

I'm using Spring Boot with JPA / Hibernate and I'm trying to decouple the business layer from the data layer. I would like to be able to (relatively easily) switch from a relational database to a rdf ...
-2
votes
1answer
26 views

Which is the recommended way to write try and multi-catch blocks in Spring MVC application?

I am using Spring MVC application having mainly 3 layers. Controller Service DAO In which layer we have to write TRY and CATCH blocks? =================================my code sample information =...
-2
votes
0answers
35 views

Spring - How to use @Bean or @Component in multiple @Configuration classes

I have a few @Configuration classes that need to use the same bean of type ApplicationProperties. I know that it is possible to use: @ConfigurationProperties(prefix = "app") @Component public class ...
0
votes
0answers
24 views

Notification architecture design for PUSH

I am working on a Spring-MVC application in which I have a Notification object, in which I am adding data and then pushing it via our PUSH framework. Normally, Notifications are only generated when ...
0
votes
0answers
41 views

How should I learn Spring framework with massive PHP background? [closed]

I've been developing web services using Symfony/Laravel for 3+ years. I fully understand what is SOLID, GRASP, DI, etc and how to use them. Java language looks easy for me in terms of syntax and ...
-3
votes
0answers
32 views

Displaying distributed topology

I have a distributed system with server components like: server_1, server_2....server_n. Every server is replicated at least one times. Those servers often connect/disconnect to each other. I'd like ...
0
votes
0answers
11 views

Web application Scaffolding using sub modules in SpringMVC

I have been tasked with developing a web application that allows users to search for a client and invoke one of a handful of services that will ultimately generate a database query with user provided ...
-3
votes
1answer
39 views

Update Spring MVC project to the last version (Maven, Eclipse)

I would like to update my Spring MVC project to the last version of Spring MVC but i don't now how to do that using Eclipse IDE (using Maven).
0
votes
1answer
92 views

Is this class thread-safe?

I have an entity class package org.demo.stack; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class ...
1
vote
1answer
40 views

Handling validation/exception responses in rest-ful app

So I am facing a problem with handling all sorts of exceptions within spring-boot application. Basically project is structured: back-end (services, repositories) <----- RestControllers <---- UI ...
2
votes
2answers
161 views

Architecture review - case study (Spring MVC)

I'm developing an Java Web Application with Spring, and I have some questions about my architecture. Before showing it, here is the context: I am developing a web application with more than 80 ...
-2
votes
1answer
99 views

How to develop UI using same server instance (without restarting)

I'm java developer. We developed good back end application. Customer asked UI part for it, but UI part development in our program needs each time restart the server (to refresh WEB static files). Is ...
2
votes
1answer
85 views

Unique Identifiers for classes - Java with Spring

My use case requires me to implement multiple validators which implement the interface: public interface Validator { boolean validate(Object o); } Based on the business group of the Object o, a ...
0
votes
1answer
87 views

Is Multi-Tenancy a viable option in any Java RAD Frameworks?

I've worked as a Full Stack Java Web Developer for many years now and of all the projects I have worked on two things are true of all of them: They were all Multi-Tenant applications with one ...
6
votes
1answer
118 views

Best practice for ensuring name uniqueness/correctness in message queues in a microservice architecture/distributed system

I was wondering what a good solution would be for ensuring that queue-names are entered correctly and are only used by the correct applications in a large system which uses message queues to exchange ...
2
votes
2answers
95 views

Microservice architecture shared domain models

Lets assume that we have a Spring Boot application that uses microservices architecture. Each of the services has its own domain models, but each service must reference a User domain object. What ...
1
vote
2answers
144 views

Opportunity cost of DIY DI?

Java here. I have always used Spring DI (for Spring projects) or Guice (for non-Spring projects) for dependency injection, and have always loved them. I recently took a job where they do 100% "DIY DI"...
0
votes
0answers
92 views

How to use Hadoop HBase with Spring Boot without knowing the schema of the database ahead of time

I have created a basic application with spring boot and HSQL which connects an in-memory HSQL database with an angularjs front end using spring-boot and spring JPA with Hibernate. I am now trying to ...
1
vote
3answers
160 views

Using spring to Avoid Singleton pattern

Considering that Spring framework can manage pretty everything related to object creation (life cycle, object scope ..), is it longer necessary to use singleton pattern in an application using the ...
-1
votes
2answers
103 views

better way to load data for millions of users

I am working on a Spring/JSF app in which i have 1 scheduler to load user's sleep activity from fitbit. Right now what i do is that whenever the scheduler kicks in, I load ALL users from mongoDB and ...
2
votes
2answers
316 views

Structure of RESTful Service with Java Spring for Beginner

I am relatively new in terms of Java web development skills. I have a project that I think would make a good candidate for a RESTful service from what little I understand about APIs. I'm trying to get ...
1
vote
1answer
81 views

Software architecture for uploading dynamically created websites

I have a question that is crucial for my end of year project. Background My web application allows users to build other webapps based on drag&drop (within the domain of the webapp). These ...
5
votes
1answer
208 views

Why is it such a bad idea to share an interface between server and client?

I was reading the Spring Cloud Netflix documentation when I found out about a way to share an interface between an HTTP server and its client. They use this example for microservices, although there's ...
0
votes
0answers
26 views

Can Spring be used to gather data from TestNG tests being executed and then input this data in a webpage to show progress of tests?

Can Spring be used to gather data from TestNG tests being executed and then input this data in a webpage to show progress of tests? For example after every test step that is completed, Spring will ...
0
votes
2answers
97 views

strategy to display value for a html select

Strategy to display value for a html select I have a spring boot, application. On the client side, I use JQuery I would like to know the strategy to display "static value" for a html select. ...
2
votes
1answer
193 views

Best way to deliver and deploy JEE application to client

I've worked for a few companies and even developed projects on my own - these projects were based on Java Enterprise Edition. Sometimes with Spring Framework involved, sometimes it was a pure JEE. ...
4
votes
2answers
262 views

Organizing maven modules and spring profiles

I'm facing a design problem with Spring's profile and Maven multimodule project from which i'm building a product, as a web as application that can be customized for differents clients. For this i ...
2
votes
1answer
240 views

API Gateway (REST) + Event-Driven Microservices

I have a bunch of microservices whose functionality I expose through a REST API according to the API Gateway pattern. As these microservices are Spring Boot applications, I am using Spring AMQP to ...
1
vote
1answer
155 views

Spring - rest API - How to unit test a rest API which gets data from another service

I am new to rest API's as well as mocks. Please help me .. I have a set of rest API's for which I need to write unit tests. rest API in turn calls another service , gets the JSON response and sends ...
2
votes
2answers
143 views

Is it correct to use PUT with multipart content?

We are using Spring and want to implement a REST with a "override file" call so we think using PUT verb with a multipart body only to find that Spring don't accept it. My question is it can't be done ...
2
votes
1answer
227 views

REST is not appropriate for business applications because of necessary to distribute business logic accross layers. REST alternative required!

I have Spring+Java Server Faces (Facelets) application for which I would like to create Single Page Application (SPA) version, e.g. using AngularJS (which is the best and most popular GUI framework). ...
1
vote
0answers
33 views

From PreAuthentication to JWTAuthorization

I would like to ask about a problem I have designing a security flow. The context I have a webapp designed in two modules web and server Web: it's a single page client, built with Angular 1.5.5 (...
0
votes
1answer
197 views

Why is a Spring's HttpClientErrorException an unchecked exception?

Oracle summarises the purpose of unchecked exceptions as: The next question might be: "If it's so good to document a method's API, including the exceptions it can throw, why not specify runtime ...
2
votes
1answer
718 views

Logging RestTemplate's responses

I want to log responses using Spring's RestTemplate. At first I thought I should do it using a ClientHttpRequestInterceptor, but since every set of requests should be logged to a different file, I ...
2
votes
2answers
382 views

Client-side Rendering vs JSP's for Spring MVC Front End Dev

Firstly, a note on the app I'm about to discuss: It's quite large, on the order of magnitude of a service app like Airbnb -- i.e., it's not just a static web page, it is a full web application. It's ...
0
votes
0answers
17 views

Visibility into Tomcat & WebApplication ClassPath loads

I am not sure if this is a thing that can be done, or if it is way to dependent on my development environment: Is there a quick way to see which applications are loading in which jar files for class ...
0
votes
0answers
79 views

JpaPagingItemReader : page size and commit interval of chunk

I have questions regarding page size of JpaPagingItemReader and commit-interval of job chunk. As per JpaPagingItemReader documentation, it says "..In order to reduce the memory usage for large ...
5
votes
1answer
130 views

How can I plugin new JARs implementing an interface dynamically?

Quick background: I am working on developing an interface that will be implemented by myself and other developers. This interface will allow users to "plugin" new functional code into a system for ...
0
votes
0answers
58 views

Incorporating external web services in Java/Spring web app

With traditional Java/Spring web apps, I've historically used an JEE architecture where there's a domain tier and a web tier. The web tier mostly contains web controllers. The domain tier includes ...
0
votes
2answers
123 views

Spring-MVC : Testing code by automatically running it in UI

I am working on a Spring-MVC application(config XML based, no Main class) in which I would like to do testing. I have known that there is a way to test code which is backend+frontend code. For that, I ...
2
votes
1answer
55 views

Getting instances without using the Spring context

I'm writing a small game of life implementation with Spring, but trying to avoid referencing the Spring context within my code. I have two interfaces, Board and Cell. In each implementation of Board ...
3
votes
1answer
80 views

where to put methods that manipulate objects

I have a controller method as follow: public class RoomsController { @RequestMapping(method = RequestMethod.GET, path="/v1/rooms/{name}") public ResponseEntity<?> getRoomInformation(@...
0
votes
1answer
187 views

Synchronisation with offline system

I'm designing a system from which I will synchronise business data from mobile device that have an embedded application that generates datas and send them back to the server. Each line synchronised ...
2
votes
0answers
49 views

Cache updates after not related REST request completes

I am wondering about the following scenario - it's in the land of Spring/AOP and Ehcache. Happens in REST Web Application - REST/Service/DAO layers - I have objects in cache (@Repository + @Cacheable)...
0
votes
1answer
137 views

Conditionally creating objects at runtime using Spring.NET

I have a couple classes in a project I'm working on that only register event handlers. public class EventLogger { public EventLogger(EventRaiser someObject) { someObject.EventRaised ...
1
vote
0answers
186 views

Securing a REST API based on authentication with external site

I have a website with an already-established authentication system. Once a user logs on to it, one of the features is a statistics application based on AngularJS. The app communicates with an ...
0
votes
0answers
67 views

Test Utility in Spring: Singleton or Static

I'm working on Test Utility in a spring project, this utility contains a methods to convert an object to JSON object and vice versa..etc and I'm confused if it's better to make the methods as ...
2
votes
1answer
155 views

Using Spring in Java Project

I've got a question about a correct usage of Spring. I know that some people use the DI "aggressively" so that they always use spring and completely eliminate the usage of word "new" in the ...
7
votes
2answers
176 views

Gradually move codebase to dependency injection container

I have a large codebase with a lot of "anti-pattern" singletons, utility classes with static methods and classes creating their own dependencies using new keyword. It makes a code very difficult to ...