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

learn more… | top users | synonyms

-3
votes
0answers
14 views

Which is better JSP with JSTL expressions or HTML with JSON. Which is good in performance [on hold]

As a Java Developer, I feel comfortable to use JSTL in JSP. But I read that JSP's are server side components. So, they consume much time to fetch it to the client every time. So I am thinking of ...
0
votes
1answer
38 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 ...
3
votes
0answers
72 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 ...
1
vote
1answer
37 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
134 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
22 views

Templating changes in Spring boot 1.3

I am currently studying java using Maven, Spring boot, and SVN. I have been assigned the task of getting both the revision number and timestamp of the project to store in a text file and eventually ...
0
votes
0answers
22 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 ...
0
votes
2answers
111 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
97 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
0answers
29 views

Collaborative web development with Spring and AngularJS

We're a team of 2, me a backend developer and my friend, a front-end guy working on AngularJS. We're planning to build our new site with Spring backend (which I'll be working on). So far, I've only ...
1
vote
2answers
157 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
68 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
161 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
24 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
1answer
80 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
110 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
209 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 ...
1
vote
1answer
126 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
66 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
107 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 ...
1
vote
1answer
149 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
23 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
119 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
407 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
191 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
15 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
52 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
112 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
55 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
114 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
53 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
79 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
128 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
48 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
115 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
151 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
61 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
141 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
171 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 ...
0
votes
1answer
118 views

Spring Consuming Internal REST WS for MVC

Sorry in advance if this is a little confusing, it's difficult how to phrase this. I am currently using Spring MVC with some RESTful services mixed in for some AJAX client side logic. I am looking ...
2
votes
0answers
25 views

Approach for querying an arbitrary set of user submitted fields and values in Spring application? Like a shopping site sidebar search?

I am working on a Spring Boot and Angular application which has a requirement to search based on any number of the available filters being applied to a list. For example, a user searches on 'Title' ...
0
votes
0answers
79 views

Implementing logging interceptor next to BeanPostProcessors and BeanNameAutoProxyCreator

I want to implement simple mechanism based on annotation on method in different classes. The case is, that I have some beans created as a proxies with transaction interceptors like this: <bean id="...
3
votes
5answers
361 views

In which layer should validation be located?

I'm creating a Rest API using Spring Boot and I am using Hibernate Validation to validate request inputs. But I also need other kinds of validation, for example when update data needs to checked, if ...
2
votes
1answer
246 views

Using prototype/non-Spring managed beans in Spring Web application

I have been working on few web applications/REST web services recently (Spring IoC/MVC/Data JPA etc) and they usually follow the same pattern: Controller classes --> Service classes (which have number ...
2
votes
0answers
65 views

Camel/EIP/ESB with messaging from a website to process an order; synchronous and asynchronous

I am investigating Camel for connecting various services. I understand the core concepts but I was curious about more specific implementation details. This application would have a browser client ...
1
vote
2answers
178 views

Testing using mocking, must I mock all dependencies too?

I have the following method to test: public List<MarkId> getMarkIdList(ICar carDoc) { ICourseCar courseCarDoc = courseCarRep.get(carDoc); List<MarkWag> markWagList = ...
4
votes
1answer
160 views

Spring Batch + Web Scraping

I need to develop a batch processing that will be executed every day. These are the steps: Read each line of a database table that contains a URL (SQLite) Extract some data, say Users, from that ...
16
votes
4answers
2k views

Why do we need frameworks for dependency injection? [closed]

I've been reading up more on the Inversion of Control principle and Dependency Injection as an implementation of it and am pretty sure I understand it. It seems to be basically saying 'don't declare ...
0
votes
0answers
78 views

Spring pass-through authentication mechanism

I want to implement a "pass-through" authentication system using Java and Spring. I want to create a service that will be transferring all incoming http requests to a different host/port where ...
0
votes
2answers
281 views

Spring StoredProcedure Inject declared parameters or not?

At work one of my colleague asked to me to change the way a Spring StoredProcedure subclass class was initialised from injecting the parameters with Dependency Injection mechanism (Constructor ...