spring-mvc Questions
26
Solved
I have the following code in one of my controllers:
@Controller
@RequestMapping("/preference")
public class PreferenceController {
@RequestMapping(method = RequestMethod.GET, produces = "text/ht...
Pattern asked 15/9, 2013 at 14:42
3
I have a legacy banking application coded in Struts 1 + JSP
Now requirement is to migrate the backend (for now MVC) to Springboot (MVC).
Later UI (JSP) will be migrated to angular.
Caveats
1.) Ba...
Footprint asked 24/7, 2019 at 15:42
3
Solved
Why we needs to use @service inside the service Implementation and @repository in the DAO Implementation. There are no problem occur when I interchange the @service and @repository annotation in th...
Phippen asked 17/2, 2016 at 6:52
4
Solved
I have a Spring-Boot application with a bean running a scheduled task at about 1 minute intervals, and this bean has a @PreDestroy method.
Is there a solution for allowing a task which is current...
Burnie asked 27/4, 2017 at 17:23
9
I'm developing a spring backend for a react-based single page application where I'm using react-router for client-side routing.
Beside the index.html page the backend serves data on the path /api/...
Elisa asked 5/9, 2016 at 13:42
9
I have build a web application using spring mvc framework to publish REST services.
For example:
@Controller
@RequestMapping("/movie")
public class MovieController {
@RequestMapping(valu...
Amazed asked 6/2, 2013 at 9:55
8
I'm trying to figure out how to "preserve" the BindingResult so it can be used in a subsequent GET via the Spring <form:errors> tag. The reason I want to do this is because of Google App Engi...
Aborning asked 30/3, 2010 at 8:35
8
I have some javascript bundled file that is pretty big, ~1MB.
I'm trying to turn on response compression with the following application properties in my yml file:
server.compression.enabled: true
...
Pyrography asked 18/7, 2016 at 10:51
2
Solved
In my REST service app, I am planning to create a @ControllerAdvice class to catch controller thrown exceptions and return ResponseEntity objects according to the error type.
But I already have a ...
Collencollenchyma asked 8/11, 2016 at 14:36
2
I am using Spring MVC + Hibernate
Generic Method
public <T, E> void saveOrUpdate(T entity, List<E> list) throws DataAccessException {
Session session = sessionFactory.getCurrentSess...
Garnetgarnett asked 27/7, 2013 at 19:59
6
Solved
I wanted to know if the {save} method in CrudRepository do an update if it finds already the entry in the database like :
@Repository
public interface ProjectDAO extends CrudRepository<Project...
Louisville asked 11/8, 2016 at 10:31
5
Solved
I have a specific controller (among many other controllers).
I would like to allow requests to this controller that are being invoked from localhost only.
Whats the best way to do this?
here is th...
Dixiedixieland asked 23/4, 2014 at 8:31
2
Solved
I have used afterPropertiesSet() to initialize class properties in Spring beans. Now I see that this task can be accomplished by Java's built in static and non-static initializers. What can I do wi...
Sanskritic asked 9/6, 2015 at 7:58
2
Solved
How can I get the raw json string from spring rest template? I have tried following code but it returns me json without quotes which causes other issues, how can i get the json as is.
ResponseEnti...
Adena asked 3/11, 2017 at 20:45
13
Solved
I have a problem with CORS filter on spring security URL's.
It doesn't set Access-Control-Allow-Origin and other exposed header on URL's belonging to spring sec (login/logout) or filtered by Spring...
Homocercal asked 27/10, 2016 at 13:56
6
Solved
I am working with Spring MVC controller project. Below is my Controller and I have a constructor declared which I am specifically using for testing purpose.
@Controller
public class TestController...
Hypaethral asked 12/8, 2014 at 19:28
3
Solved
I’m building a REST API using Spring Boot and [jackson-module-jsonSchema] (https://github.com/FasterXML/jackson-module-jsonSchema) for JSON schema generation.
I’m looking the best way to validate t...
Demibastion asked 18/1, 2016 at 15:46
2
Solved
Good evenning i no longer have a solution ..Ive been hesitating to ask for help but Im litteraly at a dead end .
Im working on a Spring boot 2.0.5 Spring MVC 5.0.9, ThymeLeaf 3.0.9 project that nee...
Heliacal asked 24/11, 2018 at 22:16
5
Solved
Currently the VariableService is @Autowired in my controller.
I realize I can implement the class ParameterizedType to make this error go away but I fear that I may be headed in the wrong directio...
Tice asked 14/5, 2012 at 19:23
3
I went back to programming my old program https://github.com/JonkiPro/REST-Web-Services. I've updated Spring Boot from version 15.6 to version 2.0.0. I have encountered many problems with compilati...
Vernievernier asked 18/3, 2018 at 21:5
4
Solved
I am getting an encrypted String as Query parameter to a Spring rest controller method.
I wanted to decrypt the string before it reaches the method based on some annotation (say @Decrypt) like bel...
Flemish asked 13/10, 2017 at 11:33
3
I am trying to integrate test a Spring Controller method that uses a spring session scoped bean which is injected into the controller. In order for my test to pass I must be able to access my sessi...
Assumpsit asked 26/6, 2015 at 17:1
4
Solved
Forum Answer saving time facing issue.before i saved successfully using @JsonIgnore but now i removed @JsonIgnore annonation.and added @JsonBackReference and @JsonManagedReference.
Stack Trace
ja...
Thea asked 23/6, 2017 at 5:42
6
I would like to call @RequestMapping(value = "", method = RequestMethod.DELETE) in spring from thymeleaf form.
Is there any possibility to call delete or put request mapping methods from thymelea...
Illume asked 17/6, 2014 at 5:4
10
Please correct me if I am wrong.
Both can be used for Data Binding.
The question is when to use @ModelAttribute?
@RequestMapping(value="/owners/{ownerId}/pets/{petId}/edit", method = RequestMetho...
Semifinal asked 17/2, 2014 at 8:24
© 2022 - 2024 — McMap. All rights reserved.