All Questions
11 questions
3
votes
2
answers
131
views
Spring boot shop application with error handling
I'm writing a simple online shop using spring boot, for learning purposes. Right now I have purchasing-service and a product-service. The purchasing-service makes requests to the product-service via ...
1
vote
1
answer
3k
views
Spring boot: better way to handle response and exceptions
I am working on a quite a big Spring Boot web service and I wanted a standardized and simplified way to handle responses and exceptions by following fluent API design.
So this is what I did and it ...
5
votes
0
answers
1k
views
Exception handling: using @JsonProperty value to make error message
If the validation in RestController fails, I need to handle MethodArgumentNotValidException and provide an errorMessage, that ...
1
vote
1
answer
181
views
3
votes
1
answer
336
views
Java: Only log first error occurrence (with hourly reset)
I have a redis caching server. If that caching server is down, my app will query the database directly.
I want to know from the logs if my caching server is not reachable. However, if I add a log ...
0
votes
2
answers
59
views
Printing the status of a database insertion as JSON
The controller is currently inserting a record into the database and returning a JSON response as shown below in the try-catch block. I can see the ...
1
vote
1
answer
165
views
Spring API that performs RSA encryption with exception handling [closed]
I'm creating a rest api using Spring which utilize javax.crypto as library to do some encryption stuff. While everything works well, I'm curious whether the error handling like this is acceptable or ...
3
votes
2
answers
247
views
Throw exception in Spring when loading a file
I have this following piece of code:
...
4
votes
2
answers
263
views
Property file loader
I have the following code:
...
5
votes
1
answer
6k
views
Handling an invalid SQL query exception
This is my DAO object that takes the Cypher query as a string, and returns a JSON representation of the graph it returns.
Because it's using a Spring JdbcTemplate ...
3
votes
1
answer
3k
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 ...