Most voted "spring-mvc" questions
Based on the Model-View-Controller (MVC) standard, Spring MVC helps build web-based applications that are flexible and decoupled from underlying technologies view.
Learn more…291 questions
Sort by count of
-
1
votes1
answer383
viewsBlock navigation until token login is validated, using Spring, Angularjs and Javascript
I have a question.. I have implemented a login validation using JWT. It works all right, generates the token within the requests. However, on the login page, if in the URL I put the next page the…
javascript angularjs spring spring-mvc spring-bootasked 7 years, 4 months ago Eduardo Krakhecke 935 -
1
votes1
answer66
viewsNullpointerexception at return of method
I am making a method to search the user logged in to the database. I’m having a NullPointerException in the return of this method @RequestMapping(value = "/usuarioLogado", consumes =…
-
1
votes0
answers152
viewsWhat should @Preauthorize do?
I’m creating a simple crud with spring-mcv and spring-security. Everything is running perfectly spring-security.xml <b:bean id="handlerWeb1"…
-
1
votes1
answer77
viewsCreating Ejbs in Spring MVC Project - Problems with Dependency Injection
I have a Java application with Spring MVC that is divided into modules as follows. proj_servicos = Mapped entities, Repository classes (communication with the bank) and Services (Where Repository is…
-
1
votes1
answer176
viewsProblems with spring mvc friendly url
by including a last page in my project I got a url problem, from which, I could not identify the problem. JSF scenario: Certification module: href="customer service/" Customer details:…
-
1
votes2
answers517
viewsUnderstanding the use of Generics in an abstract DAO Hibernate class
Hello, I am starting to develop a web application with spring+Hibernate framework, I started for an example that contained following class: import org.hibernate.Criteria; import…
-
1
votes0
answers275
viewsProblem when performing a test with POST method
I’m trying to run a unit test of the post method, but the system returns the Status expected <200> but was <404>. If I use the postaman with the Json I’m creating in Java, it returns the…
-
1
votes1
answer78
viewsDelete Oracle - Web Api
I’m trying to make this springboot code, become a code in Webapi @RequestMapping("/deletarEvento") public String deletarEvento(long codigo) { Evento evento = er.findByCodigo(codigo);…
-
1
votes1
answer64
viewsPass JSP Objects with Hibernate
Expensive, I have the classes below. I am having trouble creating a tree classification, because in JSP I am passing the parameters "Id Area" and "Tree Description", in the controller I am receiving…
-
1
votes0
answers354
viewsJava Spring Boot - Read file inside the . Jar
I’m doing a class that will read an ETL Pentaho Kettle (transformation), I put the file that the class will read in the Resources/KTR folder. But when I try to run the code as a java application…
-
1
votes1
answer3765
viewsError while running default springboot project
I am trying to run the default springboot project that I acquired here. The project has the following dependencies: <groupId>br.com.fc</groupId> <artifactId>api</artifactId>…
-
1
votes1
answer75
viewsHow to keep the same object between requests in Spring MVC?
I want to add the items to the same object Request dynamically, but always instantiating a new Request. @GetMapping("/novo") public ModelAndView preSalvar(@ModelAttribute ("pedido") Pedido Pedido){…
-
1
votes1
answer1575
viewsReceiving object by parameter
I’m using Spring MVC and use some mapping to receive an object for example and access that specific object in controller. For example: @GetMapping("/pessoa/{idPessoa}") public ModelAndView…
-
1
votes1
answer923
viewsHow to make a query by passing parameters with spring boot and redis using Jparepository?
I have the model: @Data @RedisHash("customer") public class Customer { @Id private String id; @NotNull private String firstName; ... I have the following interface: @EnableRedisRepositories public…
-
1
votes1
answer514
viewsHow to use Spring Data Binding Object for Snake case attributes while maintaining the Java Naming Conventions standard?
Hello, is there any way to perform Binding date of objects in Spring using Snake case? For example, suppose the following request GET on a job REST: http://localhost:8080/Foobar? foo_bar=example For…
-
1
votes1
answer49
viewsDoubt about the Controller in spring mvc
Hello. I am studying the spring mvc and I am a few questions about its functioning. One of them is on the part of the controller. When I fill out a form and request a controller method, are all the…
-
1
votes1
answer315
viewsUnit test (Junit and Mockito) - Clean & maintainable test code requires zero unnecessary code
I am writing the test of a findByID method(): public DoctorDTO getDoctorById(long id) throws DoctorNotFoundException { Optional<Doctor> doctorO = VerifyIfExists(id); return…
-
1
votes1
answer49
viewsBuilding a Rest api to recover data from a base using spring batch
I am trying to build a Rest api to recover data from a table using spring batch. Below my service Rest: @RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE +…
-
1
votes1
answer23
viewsSpring Security Override Problem
I’m trying to implement Spring Security...only that I’m having trouble with its configuration, @Override doesn’t work at all, and because of that it doesn’t take the user created in memory, let…
-
1
votes0
answers13
viewsHow to link an id received via AJAX there is a related entity - Spring Boot MVC
When receiving data from POST (AJAX) I only receive the id from Category and validate the class Product the following error occurs: Resolved…
-
1
votes1
answer29
viewsThere is [Fromuri] equivalent in Java Spring MVC
In ASPNET MVC, we have the following code snippet that sends information through queryString and is received in an endpoint which has a parameter of type Dtorequest and through the attribute…
-
0
votes1
answer96
viewsObject after persistence and return inconsistent to a dropdown list
Hello folks good afternoon! Well, briefly I have a problem where I have no idea what might be going on. In my opinion such behavior makes no sense. I am using Spring MVC + Spring Data to facilitate…
-
0
votes1
answer53
viewsExternal jar create file problem in Tomcat
Good afternoon. I’m having a problem that Crawler4j (an external jar) tries to create files and folders in a Tomcat application but presents the following error: Couldn’t create this Folder:…
-
0
votes0
answers512
viewsCould not find backup for Factory javax.faces.context.Facescontextfactory
I am creating a project using Spring Boot + Primefaces but when trying to access the page I get the following error: Whitelabel Error Page This application has no Explicit Mapping for /error, so you…
-
0
votes0
answers697
viewsTable with self relationship
Good morning. I have a table that uses auto-relationship, it turns out that not all names entered have parent, but I can not create a name with null parent, there is not be the first that was…
-
0
votes1
answer195
viewsForm being rendered with wrong action attribute
I am using spring form tags to render the forms present in my views, but I am facing problems because they are being generated with the wrong action attribute. In my controller, I have the method:…
-
0
votes1
answer218
viewsFailed to inject dependencies into Spring [Can’t set '' field 'to com.sun.proxy. $Proxy46]
I’m trying to perform the injection but the following battery is fired: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'siteController': Injection of…
-
0
votes0
answers611
viewsHTTP Status 404 Error - The requested Resource is not available on Spring MVC
I have tried several ways to solve this problem, but when I click to the controller to access the url it error. Follow the files Controller package com.br.maco.controller; import…
-
0
votes1
answer190
viewsComponents of the Spring MVC Framework
Good morning guys, I’m having trouble finding some specific information regarding Spring MVC, for example: Bar of Loading: JSF uses the Progress Bar component, Struts 2 o Ajax File Upload Plugin,…
-
0
votes0
answers44
viewsI cannot see the form.jsf page
I cannot see the form.jsp page I am putting the following URL http://localhost:8080/Store/ With this URL it only views the hello-world.jsp page I even put the following address…
spring-mvcasked 9 years, 3 months ago wladyband 4,694 -
0
votes1
answer281
viewsSpring MVC REST JSON
Having a problem, in my controller when I have some entity with relationship it does not return me the JSON, already try to put the @Jsonignore get us the entity references but nothing, follow the…
-
0
votes1
answer467
viewsHow can I add objects to a list dynamically through the views?
I have a question about Spring MVC. I’m developing a system using HTML5 in View, and as a renderer I am using the thymeleaf. For example, if I have a class Produto, and this has a list of Endereços,…
-
0
votes1
answer60
viewsSpring’s Bind with Collections
I haven’t been able to find a solution on how to resolve this issue yet, after researching and researching I found something on how I can bind elements of my form to a Collection in a POJO. But…
-
0
votes1
answer243
viewsOracle tnsping ok, spring Jdbctemplate TNS:Istener does not Currently know of SID Given in connect Descriptor
I’m facing a problem, I hope you can help me, I am developing a web application running on Tomcat using Spring-mvc and data access with Jdbctemplate, the database is Oracle 11g. Within this scenario…
-
0
votes1
answer319
viewsSpring encoding problem
Good afternoon Personal, I’m working on a project with Spring MVC and Spring Security. But the same, is presenting problem in the character encoding, when I deploy on an external server, IE, run…
-
0
votes0
answers136
viewsSpring: java.io.Notserializableexception: Mapsqlparametersource
I’m trying a simple Spring Jdbctemplate based Insert mapping query parameters with Mapsqlparamatersource and I’m making an error according to the data below: public void adiciona(Conta conta) {…
-
0
votes0
answers108
viewsHow to edit an image stored as BLOB
Using Spring MVC, thymeleaf and mysql, I have an image stored in the database as BLOB, along with other attributes and can render the image on the screen normally in a list. From the list, I can…
-
0
votes2
answers267
views404 in css file after spring mapping
Good night to you all! I can’t access the css of my application in spring, even after mapping resouce, follows codes: @Override public void addResourceHandlers(ResourceHandlerRegistry registry) {…
-
0
votes1
answer269
viewsSpring MVC + Maven + Bootstrap Problem
Good morning. I’m trying to put bootstrap on the index of my application but I’m not getting it, index does not read CSS. I searched on the Internet and from what I understood, css should be within…
-
0
votes1
answer121
viewsSpring Modelandview not working properly with AJAX callback
Well, some time ago I made a feature on my site consisting of performing a filter (called AJAX), and in my action I simply return a view (at the moment I’m rendering via callback, but if possible I…
-
0
votes1
answer178
viewsload value in empty front form without starting with 0 [java] Thymeleaf + spring
my Entity is as integer and load n front with value 0, I think it is a simple thing but I do not understand much.…
-
0
votes3
answers35
viewsDoubt Spring MVC Controller
I’m studying Spring MVC, and I’m developing a system that will contain questions and answers. Like the Controller, I create one for Questionscontroller and one for Answerscontroller, or just 1 for…
spring-mvcasked 7 years, 8 months ago Fernando 227 -
0
votes2
answers1156
viewsSpring MVC and UTF-8
I’m making use of Spring MVC in a project, running on a Glassfish server and having trouble displaying text on JSP pages that contain special characters such as accents. I tried to put the charset…
-
0
votes1
answer62
viewsSpring Security permissionEvaluator not invoked
I’m trying to use my own permissionEvaluator, but the spring is not recognizing/invoking my settings. My current situation: package com.brunorozendo.security; import java.io.Serializable; import…
-
0
votes1
answer179
viewsProblem with Rest controller in Spring
I set Spring 4 to work without xml. I created a @RestController simple, like this: @RestController public class JogadorRest { @RequestMapping("/ola/{jogador}") public Jogador message(@PathVariable…
-
0
votes0
answers120
viewsOutdated data in Hibernate + JPA queries
I noticed a problem in my Spring application, I am implementing an internal messaging service and when creating the display of the amount of unread messages I realized that the value varied with…
-
0
votes1
answer323
viewsI cannot view the jsp page of a Spring MVC project
I cannot see the form.jsp page I am putting the following URL http://localhost:8080/Store/ With this URL it only views the hello-world.jsp page I even put the following address…
spring-mvcasked 9 years, 3 months ago wladyband 4,694 -
0
votes1
answer84
viewsError when starting spring
First of all, I use java 9 and apache Tomcat 9 When I start the application this error happens: 18:00:46,804 ERROR DispatcherServlet:492 - Context initialization failed…
-
0
votes1
answer100
viewsFloat with Spring null value
I have an application with Spring Data. Calling the Spring findAll() method, there are null values in the database. When setting the object the field comes with null value triggering the error…
-
0
votes1
answer94
viewsRecover a property of a file . properties directly with Thymeleaf
In a file . properties I have a property with the system version. Is there any way Thymeleaf can recover this property directly? I want to use in the footer that is a fragment used in all pages.…