spring-mvc Questions
4
Solved
I have a Controller class with a function that saves a record to the Database. I am passing several parameters to the Controller function however i think i may be writing the @RequestMapping incorr...
Blear asked 6/11, 2013 at 2:43
6
Solved
I have some Spring RESTful (RestControllers) web services with no web.xml and I am using Spring boot to start the services.
I want to add authorization layer for the web services and wanted to ro...
Pierre asked 13/7, 2016 at 19:31
2
Solved
I woud like to disable all actuator endpoints except for the health endpoint. All docs describe how to achieve this in the resource properties:
endpoints.enabled=false
endpoints.health.enabled=tru...
Illinois asked 10/7, 2015 at 9:9
6
I wanted to use both annotation mapping and xml mapping in Spring MVC. My application-context.xml as follows:
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping&qu...
Amadaamadas asked 29/8, 2014 at 13:28
6
How to send websocket message from server to specific user only?
My webapp has spring security setup and uses websocket. I'm encountering tricky problem trying to send message from server to speci...
Airspace asked 13/3, 2014 at 1:14
8
Solved
I keep getting this error, and can't figure out why.. yes I know there many people had similar issues, but reading the answers they got, does not solve my problem.
org.springframework.beans.fact...
Saponify asked 14/8, 2012 at 14:25
4
Solved
I have a properties file which I would like loaded in to System Properties so that I can access it via System.getProperty("myProp"). Currently, I'm trying to use the Spring <context:propert-plac...
Bray asked 7/11, 2010 at 6:4
5
I am trying to set home page of my application by using spring boot.. but I am getting the error as Could not resolve view with name 'index.html' in servlet with name 'dispatcherServlet'
My code i...
Internalcombustion asked 12/7, 2018 at 10:36
9
Suppose a hyperlink is clicked and an url is fired with the following parameter list myparam=myValue1&myparam=myValue2&myparam=myValue3 . Now how can I capture all the parameters using @Req...
Peso asked 14/3, 2014 at 7:39
2
Solved
I wanted to analyze the improvement I may see by enabling Async Controllers in Spring Boot over normal controller
So here is my test code. One API returns a Callable and another is normal controll...
Semiautomatic asked 18/6, 2016 at 14:25
12
My Spring boot app has this application structure:
src
main
java
resources
application.properties
This is my application.properties file:
logging.level.org.springframework=TRACE
loggi...
Joettejoey asked 1/8, 2017 at 4:8
5
Solved
I have a class:
class User(
var name: String
)
And a mapped post request:
@PostMapping("/user")
fun test(@Valid @RequestBody user: User) {
//...
}
What if a client will send a JSON of a u...
Lanoralanose asked 2/2, 2017 at 3:29
2
In our project we are using @AutoConfigureMockMvc with printOnlyOnFailure left as default, true.
This works fine and prints none of the requests… except if any test fails. At that point, it prints...
Inbreed asked 24/5, 2019 at 14:33
8
I have a Hashmap (String, List<Offers>), passed to a Thymeleaf page. I am getting this map on the page and I can access it.
How can I do map.get(key) with Thymeleaf? I just need to fetch the...
Clementeclementi asked 20/2, 2015 at 3:45
2
Solved
I have a User entity having email property annotated with @Email
@Email
private String email;
I am using @Valid (javax.validation.Valid) annotation on my Controller class. The issue is that the ...
Merkle asked 25/5, 2018 at 18:47
2
I am trying to use the Meta-annotation of spring using the aliasFor annotation to create a custom annotation for the springs RequestParam
Simply 'extend/replace'
@Target(ElementType.PARAMETER)
@R...
Preinstruct asked 8/8, 2016 at 11:53
3
Solved
I am working on project where I use Spring Data. I wanted to fill in creationTime field using @CreatedDate annotation instead using method with @PreUpdate or @PrePersist annotation (doing it this w...
Stylish asked 10/12, 2013 at 0:39
0
With Spring 4.3.5, we have been using an application architecture where we initialize some of the beans at a go and then use the beans as "Reference" for other beans.
Something like this
...
Fancywork asked 5/3, 2022 at 19:36
3
Solved
We basically have the same problem as this question poses, but for lists and additionally, we are looking for a global solution.
Currently we have a REST call that is defined like this:
@RequestM...
Funda asked 8/2, 2017 at 18:11
4
Let's assume that I have a form where I might submit username(@NaturalId) and password for a new user.
I would like to add the user with a unique username. How can I use @Valid annotations to vali...
Chic asked 13/6, 2013 at 16:43
3
My application is build with spring-webmvc and spring-jdbc without spring-boot. In my application.properties I have:
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
datasource.db...
Gintz asked 22/10, 2020 at 18:8
4
Solved
Using a Spring Boot web application I trying to serve my static resource from a file system folder outside my project.
Folder structure looks like:-
src
main
java
resources
test
java
resou...
Tlaxcala asked 17/2, 2015 at 6:54
6
Solved
Main model classes are as follows :
public class UserAddressesForm {
@NotEmpty
private String firstName;
@NotEmpty
private String lastName;
private List<AddressForm> addresses;
// s...
Klemm asked 28/2, 2011 at 12:36
16
I am getting this error when I am trying to update values in my database from my spring mvc application :
org.hibernate.StaleStateException: Batch update returned unexpected row count from updat...
Karaite asked 7/2, 2014 at 10:20
1
Solved
As far as I understood, Spring manages autowiring mechanism with AutowiredAnnotationBeanPostProcessor on postProcessBeforeInitialization stage. But how does it inject proxies that ought to be creat...
Feminize asked 17/3, 2021 at 20:5
© 2022 - 2024 — McMap. All rights reserved.