The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise ...

learn more… | top users | synonyms

3
votes
2answers
24 views

REST service to list new, continuing, and terminated subscribers during some period

I have a use case which says: Your REST service will consume a JSON object that contains a list of emails for subscribers at the start of the subscription period, and a list of subscribers at ...
1
vote
1answer
18 views

Environment-specific code in @Async mail method with Spring

I have a Spring @Service to asynchronously send emails. The part that seems to be a bit off to me is some code that is specific to our QA environment. We want to send and receive all emails through ...
0
votes
0answers
6 views

Feedback requests - spring webskite skeleton [closed]

I've been working on a skeleton for the spring framework (without using springboot). It's maybe 90% done. I'm not java pro - I was wondering if anyone could provide some feedback on architecture ...
1
vote
1answer
40 views

Re-using this piece of code for different objects

To give a little context before showing the problem: I am creating a RESTful web application. A User can have multiple addresses, emails, phones and projects. Each of these is represented similar to ...
3
votes
1answer
61 views

Spring oauth2 token store supported by redis

I had to make a demo for Spring oauth2 with redis store for tokens. I started with the sparklr2 (with tonr2) sample app from here. They are demo apps to show oauth2 powered by spring. Sparklr is the ...
2
votes
1answer
41 views

Handle NullValueInNestedPathException

I am looking for a elegant solution to this. I am new to Spring framework. I have a method: ...
4
votes
1answer
59 views

Static method to get user ID

I have a method which extracts the logged-in user details from a SpringSecurityContext object. I have read that only utility methods (which does certain ...
4
votes
0answers
55 views

Property Change Listener for Entity Management

I would like to know if the solution I came up with for managing relationships between entities is sensible. Guys in my team feel it is transparent, but maybe I'm missing a pitfall somewhere? ...
2
votes
1answer
96 views

Using FlatFileItemReader and Asynchronous Processors

I have a simple csv file with ~400,000 line (one column only). It takes me a lot of time to read the records and process them. The processor validating records against couchbase. The writer - writing ...
34
votes
2answers
2k views

You are being watched! - Comments of Interest

You are being watched Code Review has an open system A machine that spies on you on every hour of every day I know because I built it. I designed the machine to detect suggestions to post ...
1
vote
0answers
549 views

Shopping cart application in Spring MVC

I am creating a shopping cart application to learn Spring MVC. I want to display a list of all categories and subcategories in more than one page. i.e; Home Page, Products page, Category page. In the ...
6
votes
1answer
408 views

Spring configuration without XML is this reality?

We're doing a website for Cardshifter, and now I've converted the plain html files and css into a Spring MVC web application. Here is the typical configuration classes that I used in most of the ...
0
votes
0answers
354 views

Performance increase on Spring integration

I have been running a program to read a file having 6 million rows and validate each line and write the string containing the validation message to an output file. I am using spring integration to ...
-3
votes
2answers
48 views

enum property comparison in if-else structure - How could I generalize this? [closed]

So I have two methods. They do the following. ...
2
votes
0answers
71 views

NoSQL-based sequence generator

For my web application I have to generate a sequence of following format: <year><sometext><month><sequence> For example: ...
1
vote
1answer
65 views

Converting a wrapper object to a value object

I have ChannelWrapper and Channel Value Object. I want to convert each and every field of ChannelWrapper to Channel Value ...
3
votes
3answers
194 views

TimeZone computing method

I feel like there is a code smell in this. Can someone help me to refactor/optimize it? ...
1
vote
1answer
64 views

Spring Service Method Logic

I am learning spring and am wondering about this service class's method. Is there a way to split this method up? Is there a way to use spring framework to make this method more readable? Should I move ...
2
votes
2answers
103 views

Performance enhancement for collection manipulation

I have below snippet of code which gets all the available menu items for a zone(top or left)and adds the widgets for which user has access to an ArrayList collection. For now the ...
10
votes
2answers
280 views

Super sophisticated game information web application

Considering I've got an exam on Spring tomorrow, I figured you could review a small example application I whipped together as preparation (and as such, I'd prefer the emphasis to be on Spring-related ...
3
votes
2answers
110 views

Non-input related check in validator?

In a user registration form, the validator currently checks not only user input, but also whether or not the user exists. This seems like business logic, which in terms of design should be in the ...
1
vote
2answers
76 views

Intended to return account address using account ID, which uses Spring Stored Procedure class

I have not used Springs stored procedure class before to return data and I was hoping someone would be able to check this for me.. If it will A. Return data, B. Can be improved. C. If I wanted to ...
1
vote
1answer
83 views

Java service layer code cleanup

I have the block of code from my project service layer and I'm not happy with it. It seems overly complex and I would hate to have to calculate the cyclomatic complexity. This block is called in ...
4
votes
2answers
2k views

Eliminating duplicated code blocks

I have an abstract PersonDao class, extended by several other DAO classes, for example EmployeeDao, ...
3
votes
1answer
95 views

Logging a message and the stack trace of caught exceptions

Using Spring's JdbcTemplate to load a specific object by ID if exists, I have this code: ...
5
votes
1answer
1k views

Create better Base DAO class

I created a DAO class which is base class for all other DAO classes. I use Spring Framework 4 and Hibernate 4. Question: Is there anything that could be done better? ...
5
votes
1answer
85 views

JMS configuration — client exclusive messages

I am SURE this is somehow easy but reading the docs isn't bringing it to light. The problem: I am trying to setup a JMS message listener and what I need is for the first client to have exclusive ...
3
votes
1answer
104 views

Class naming conventions

I have the following scenario: The (web-) application is built with Java/Spring. I have several REST-endpoints which deliver data prepared to be consumed by a frontend by ...
6
votes
2answers
1k views

Spring password validator library

I recently got rejected at a job interview for submitting this: https://bitbucket.org/gnerr/password-validator The interviewer asked for a password validation library that was configurable via ...
2
votes
1answer
173 views

factory pattern in spring

I have the following factory class, wonder if this code can be implemented in better way. I saw few discussions about spring factory bean, but don't find good examples. ...
2
votes
1answer
374 views

JettyGwtSpringSample web application

I just created a sample project using Spring 3.x, Jetty 9.x, GWT 2.5.1 and Gradle here. It's a slightly modified version of the 'Greeting' GWT application from Google, the only change being that RPC ...
3
votes
1answer
1k views

Managing Data access layer exceptions

I am developing a webapp using Spring MVC + Hibernate. I created a GenericDao class that implements basic data access methods, to be extended by all my concrete daos in the app. What I want advice or ...
5
votes
2answers
4k views

Spring autowiring in managed beans with support for serialization - is this safe?

Im trying to solve two problems I see with JSF2 and Spring. First @Autowired in @ManagedBean does not work Nor does ...
6
votes
1answer
186 views

Circular dependencies between immutable objects; the Freeze Pattern

Generally, I structure small threadsafe immutable objects like this: ...
4
votes
1answer
191 views

Avoiding using strings when using Spring.Net by incorporating instantiation in class

Totally new to MVP and Spring, and I have what seems to be typical MVP application that uses Spring, where the presenter is instantiated like: ...
1
vote
1answer
237 views

Java API code with Spring

Model: ...