All Questions
11 questions
0
votes
1
answer
138
views
Microservice in Springboot
I wrote two microservices in Springboot and tried to follow the best practices. I would appreciate any suggestions about any improvement that I can make on the whole codebase. What are the parts of ...
2
votes
2
answers
123
views
Designing object oriented clean code structure with spring services
I'm writing spring app for storing and manipulating recipes. I wrote ShoppingList service which generates, based on UUIDs of recipes, shopping list. This is my current model for which i wrote tests ...
2
votes
2
answers
680
views
Loan application service based on user credit score
The following microservice is just handling loan application and response the result of the application is accepted or rejected. It is part of my assignment for an interview.
The project description ...
1
vote
1
answer
60
views
Repository and service improvements
I have a MongoRepository:
...
2
votes
2
answers
322
views
Spring service for playing Rock Paper Scissors
I had created a service which does the actual play of Rock Paper Scissors.
Below is the service which takes a PlayRequest and updates the State of Player objects given by the PlayerService.
So the ...
2
votes
0
answers
74
views
Initiate, propagate, validate, send, and marshal a message in Spring
Purpose of code
The goal of this code is to:
Initiate a message propagation to other systems
Validate that the given message adheres to its XSD schema, and then marshall it
Send it on a Camel route ...
5
votes
1
answer
4k
views
Custom ResponseModel for Spring Controller - ResponseEntity<?>
I created a custom responseModel to have a standard json responseModel for some of my different RestController.
Superclass TransactionResponseModel:
...
0
votes
1
answer
150
views
Refactoring service class which communicates with external API
Below is the class definition which I created as a POC for some project, at present the class does too much thing and I don't know how to what would be a good design i.e. which object to use as DI etc....
1
vote
1
answer
335
views
Class Design : Parsers for different file type and ParserFactory
I have come up with a class design for parsers (for xml,csv etc) and parser factory. I will be using it in my project.I will be configuring these as beans in the spring context file. I would like to ...
3
votes
2
answers
5k
views
DAOs for Person, Employee, Staff, etc
I have an abstract PersonDao class, extended by several other DAO classes, for example EmployeeDao, ...
6
votes
1
answer
480
views
Circular dependencies between immutable objects; the Freeze Pattern
Generally, I structure small threadsafe immutable objects like this:
...