spring-mvc Questions
8
Solved
I am new to Spring Security and I am working on a login, logout, and session timeout feature. I have configured my code by referring to this document. My code looks below:
@Override
protected void...
Jair asked 22/4, 2016 at 13:52
9
I need all SOAP requests logged in the CommonLogFormat (see http://en.wikipedia.org/wiki/Common_Log_Format), plus the duration (the amount of time it takes to process the request).
What's the best...
Juneberry asked 18/8, 2011 at 14:40
4
Solved
I am trying to put validation to a Spring Boot project. So I put @NotNull annotation to Entity fields. In controller I check it like this:
@RequestMapping(value="", method = RequestMethod.POST)
pu...
Landan asked 6/9, 2016 at 11:43
2
Solved
Assume we have defined a controller class which has @Controller annotation only.
Inside the class, we have defined private @Autowired HttpServletRequest request; variable.
Spring Controllers are ...
Sands asked 2/2, 2018 at 2:18
10
Solved
I am using Spring 4.
My form contains the following variables:
@NotNull
@Email
private String email;
@NotNull
private String firstName;
@NotNull
private String lastName;
@Digits(fraction = 0, inte...
Breadwinner asked 31/1, 2014 at 10:55
3
As we all know, forms only support GET or POST methods, like this:
<form method="[GET|POST]" action="/user/create">
If our controller has a PUT mapping, we get a 405 erro...
Nardoo asked 2/12, 2015 at 17:0
2
I'm trying to make a simple internationalization example in spring mvc 4 with spring boot, but it's not working. Here is my web app structure
And here's my java configuration:
import java.util...
Harriman asked 10/3, 2016 at 9:34
5
Solved
I wrote a web socket server and a client with spring. The codes is following. The codes sending message to server work, but the sesssion.subscribe method cannot receive message from the server. I s...
Anthea asked 12/1, 2017 at 3:52
4
Solved
I have worked in Jersey and RESTEasy framework earlier and now we will be using Spring Rest for a new project , I don't want to pass all the query params and matrix params as parameters in the meth...
Flatways asked 9/1, 2016 at 5:40
5
Solved
I've updated Spring Boot from version 1.5.6 to 2.0.0 and a lot of problems have started. One is the problem given in the subject.
I have a class with properties
@Data
@ConfigurationProperties("ecl...
Raquelraquela asked 18/3, 2018 at 17:51
17
When I try to post new object with post method. RequestBody could not recognize contentType. Spring is already configured and POST could work with others objects, but not this specific one.
org.sp...
Rheinland asked 18/10, 2013 at 8:21
6
I have created spring boot web application, but I am unable to deploy spring boot web application WAR file on tomcat and I am able to run it as java application. How to run spring boot application ...
Underbid asked 29/12, 2015 at 7:45
1
HandlerInterceptorAdapter is deprecated
this is my code
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
public class MyInterceptor extends HandlerInterceptorAdapter{
}
...
Ahron asked 30/7, 2022 at 8:36
9
Solved
I want to include js and css files in my jsp, but I'm not able to do so. I'm new to the concept of spring MVC. For a long time, I've been working on this same topic.
My index Page is like this
<...
Eucken asked 9/10, 2014 at 10:53
2
Solved
So I've been trying to implement oAuth2 in a simple Spring MVC app.
In the guide I was following, in their AuthorizationServerConfigurerAdapter they @Autowired an AuthenticationManager. They used ...
Earshot asked 18/3, 2018 at 13:43
7
Solved
What's the difference between @GetMapping and @RequestMapping(method = RequestMethod.GET)?
I've seen in some Spring Reactive examples, that
@GetMapping was used instead of @RequestMapping
Oquassa asked 22/8, 2016 at 10:58
2
Solved
i have controller through which it navigate to home.jsp in home .jsp there is two button FindEmployeeByid FindEmployeeByName now as i click on FindEmployeeByid new popup window is opened but in pop...
Buffet asked 7/1, 2013 at 9:20
4
Solved
I've a web application using the spring(4.2.x) artifacts spring-webmvc, spring-messaging, spring-websocket
I've the below @Enable* annotations in my spring config java class
@EnableWebMvc
@Enable...
Presbyterate asked 4/8, 2015 at 18:13
4
I have a Spring Boot 2.1.6 application (Spring 5), and I'd like to use Thymeleaf as my templating engine. I followed online tutorials to setup my project, the views and the controllers, and when I ...
Kulda asked 12/7, 2019 at 15:31
4
Solved
I have created a Spring MVC REST service using Bean Validation 1.2 with the following method:
@RequestMapping(value = "/valid")
public String validatedMethod(@Valid ValidObject object) {
...
Corwun asked 17/7, 2014 at 19:11
4
Solved
Hello I have a simple web page where I have a button and a text near to button. I need to change text when button clicked and get the new text from code.
This is controller class from where I need...
Lauro asked 11/7, 2019 at 14:18
12
I want to know whether the Spring singleton beans are thread-safe, if yes then why, if not then why?
As I am beginner with spring so help would be appreciated.
Dunigan asked 27/6, 2013 at 12:13
7
Solved
When sending JSON requests to the server, I'm often greeted by this message:
The request sent by the client was syntactically incorrect ().
Usually it's an incorrect attribute that was passed ...
Lacy asked 20/10, 2012 at 17:2
2
Solved
I have a spring application that I want users to be able to change the preferred locale. Currently users can change the locale for the current session but I want to be able to save the users option...
Hydrogenize asked 12/1, 2018 at 15:22
4
I am building a Spring Boot application and trying to implement custom validation for some DTOs/Entities that I will be validating in the service layer. Based on the Spring documentation on this ma...
Woolson asked 6/4, 2022 at 14:39
© 2022 - 2024 — McMap. All rights reserved.