Skip to main content

Questions tagged [spring-mvc]

Based on the Model-View-Controller (MVC) pattern, Spring MVC helps you build web-based applications that are flexible and decoupled from the underlying view technologies.

4 votes
2 answers
489 views

I am developing a Web application using Spring boot (I am a beginner). How can I make my code better? This code is from "AuthenticationService.java". I first made an interface for defining ...
RudraSama's user avatar
  • 181
1 vote
2 answers
1k views

I used factory design pattern to identify the service according to the enum that comes from the api uri as request param. Everything seems okay according to me but cannot be sure if I used it right. <...
Abdu Muhammadal's user avatar
3 votes
1 answer
136 views

I have a Spring MVC controller but I'm not sure that it is a good or bad design. As far as I know, api versioning is missing but apart from that I implemented Swagger for documentation and added ...
Burak's user avatar
  • 31
1 vote
1 answer
3k views

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 ...
benjamin c's user avatar
0 votes
1 answer
165 views

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 ...
forhadmethun's user avatar
13 votes
2 answers
2k views

I have to write a simple web application using the Java Spring framework as my course project. So I decided to write a simple Stack Overflow clone. My application has the following features: ...
eanmos's user avatar
  • 405
4 votes
2 answers
14k views

I wrote this code in order to return a http status of not found to my users in case the resource is not present in the DB. ...
Pitto's user avatar
  • 829
14 votes
4 answers
4k views

I wrote my first unit testing code on a service class using Mockito. The code looks like this: ...
Patrick's user avatar
  • 341
4 votes
1 answer
31k views

I want to create a very simple banking application where (i) predefined accounts with a positive balance can send money (ii) requesting balance and a list of transactions can be found. I have ...
forhadmethun's user avatar
2 votes
0 answers
108 views

During a question on Stack Overflow, another user had some comments about the way this code works. He had a few choice words for it, including "magic", "ugly contraption", "you're doing things you ...
Nzall's user avatar
  • 1,548
3 votes
1 answer
4k views

I am trying to consume a REST endpoint by using the RestTemplate Library provided by the spring framework. The endpoint also demands a Bearer Access Token as its authorization header, which is only ...
Nithin's user avatar
  • 131
0 votes
1 answer
82 views

I have a Spring Boot application and I wrote a piece of code to manage relationships between two entities. The code consists mostly in these two methods: ...
lch's user avatar
  • 103
1 vote
2 answers
183 views

I have an object (ShoppingCart) that has a list of CartItems, which contains the related ...
fsakiyama's user avatar
  • 111
3 votes
1 answer
6k views

I recently worked on a module, in which I implemented the functionality of downloading the CSV files. ...
user10753505's user avatar

15 30 50 per page