Most voted "spring" questions
Spring Framework is an open source framework for developing applications on the Java platform. At its core is rich support for component-based architectures, and currently has more than a dozen highly integrated modules.
Learn more…787 questions
Sort by count of
-
0
votes1
answer599
viewsHow do I make a method in the Spring controller that does the same as this method of a Servlet?
This code returns a json for an html page that uses an ajax resource to load a Chart from the Google API I’d like to do the same but using a Spring controller! public void doGet(HttpServletRequest…
-
0
votes2
answers300
viewsHow to add custom methods in all spring data services
I implemented methods into one Repository for all my children repositories have the same methods. Download the code of how I implemented a Repository Personalized This is the interface:…
-
0
votes0
answers47
viewsCriteria Hibernate - Error
I’m getting the following Exception, I analyzed my code and I am not able to find the error. The query is performed and returns the objects, but when returning, launches the Exception.…
-
0
votes2
answers1310
viewsSpring data JPA findOne() returns null
I am developing an application using Spring MVC, with spring data jpa in the persistence layer. When I try to do a search using the method findOne (or findById) returns always null. I already…
-
0
votes1
answer262
viewsError While Uploading with Bootstrap fileinput
Well I’m having problems with this plugin would like to know if anyone has messed with it and if it could help in the question I am having problems communicating with the controller I am taking the…
-
0
votes0
answers38
viewsSpring + Opensessioninview does not work
I’m a beginner with Spring and would like to use Opensessioninview so I don’t have to implement my Filter. Filing cabinet web xml. <web-app id="WebApp_ID" version="2.4"…
-
0
votes2
answers117
viewsCreate a Download according to element id
I created a system that uploads several files, but I ran into the following problem: I need to create a way to download according to the element id in the database. I wonder if anyone has an idea I…
-
0
votes1
answer390
viewsSpring + Bootstrap application with problem to locate contextPath and apply CSS
The page is working normally, but the CSS is not being applied, as well as images within Resources are not being located. Follow methods of the configuration class to locate Resources, and it…
-
0
votes1
answer334
viewsCustomize pdf file name made in Jaspersoft, java and spring
I have several reports made in Jaspersoft that generate PDF and when generated in Java, when downloading the report on my pc, it is as "Document.pdf". How do I name this report differently, for…
-
0
votes1
answer177
viewsRest Spring server identifying a point as a regular expression
I have a Rest service with the following method: @RequestMapping(value = "/usuario/{login}", method = RequestMethod.GET) @ResponseBody public ResponseEntity<InputStreamResource>…
-
0
votes1
answer101
viewsHow do I redirect Exception to an error page?
How do I redirect Usernamenotfoundexception to a page? if ( user == null ) { log.info( "Email " + email + " não é um ususário cadastrado." ); throw new UsernameNotFoundException( "Email " + email +…
-
0
votes1
answer188
viewsRefactoring for Spring Data returning List<Object[]>
I came across a project where I have several methods in Repository of this kind: @Query(value = "SELECT " + " i.uf, " + " i.cidade " + "FROM Imovel AS i " + "WHERE i.ativo = 'Sim' AND " + " EXISTS…
-
0
votes1
answer19
viewsIs it possible to have a constant populated through a Spring @Service?
We have a web service that one of its parameters is called source and this source is always validated against a code in the database. For each of our services, I have to validate this code. This…
-
0
votes0
answers88
viewsError org.hibernate.dialect.Firebirddialect does not support Identity key Generation
This error appears when I go to save an entity in the database. I have configured the Entity class and the Repository in several ways, but the error remains. I am using Firebird 2.5. The table…
-
0
votes2
answers2434
viewsError while booting application with Spring Boot
I am creating an application using Spring Boot with JPA. When I go up the application, the following message is launched: Description: Cannot determine Embedded database driver class for database…
-
0
votes1
answer177
viewsNullpointerexception when calling method return in another class
I have the following method in the Logincontroller class @RequestMapping(value = "/usuarioEntidade", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST) public Resposta…
java spring spring-mvc spring-boot nullpointerexceptionasked 7 years, 1 month ago Eduardo Krakhecke 935 -
0
votes1
answer303
viewsError validating Java user, Spring
I have an error validating the user next to the database. I’ve debugged and the data (which you see from the front end) is being received by the API. The method that makes the search in the database…
-
0
votes3
answers814
viewsI cannot display Spring error message
I’m trying to validate some annotated fields, but I can’t bring the messages to the jsp page: Java user. mport java.util.Calendar; import javax.validation.constraints.Email; import…
-
0
votes1
answer346
views@Datetimeformat with daylight saving time error
I’m having a problem converting date of day 15/10/2017 (start of daylight saving time) My mapping is like this: @Column(nullable = false) @NotNull @DateTimeFormat(pattern = "dd/MM/yyyy") private…
-
0
votes3
answers3880
viewsHTTP status 500 Internal server error
I have a problem in my web application in spring boot compiles and starts the server, but when it starts localhost:8080/buscar appears the following error: Controller class: package…
-
0
votes1
answer96
viewsEureka + Zuul + micro services + Thymeleaf - Problem loading webjars
I am creating a system based on micro service architecture with the following flow. Eureka door(8888) Zuul door(8080) stu_usuario (8081) /Usuario/** stu_vehicle (8082) /Vehicle/** From what I…
-
0
votes1
answer86
viewspost call does not work, returns error 405
have the following javascript <script type="text/javascript"> function calculaReducao(){ var nd1 = document.getElementById("nrDentes1").value; var nd2 =…
-
0
votes1
answer708
viewsTreating null Pointer Exception
I’m getting, in my back end, a json object from the screen this way: { "pessoa": { "nome": "aa", "nomeSocial": "aa", "tipoPessoa": "F", "nomePai":"", "dataNascimento": "15/06/1983", "nomeMae": "a"…
-
0
votes1
answer105
viewsload select option with spring variable
I have a table populated with <c:foreach> and in one of the columns I have a 'CHANGE' click on it and load the information of what I want to change on another page. Already on the other page,…
-
0
votes0
answers228
viewsjavascript post
In my HTML I take this 'Right-Handed' STRING and pass to this JS sendPost() <tr> <td>Destros</td> <td><span class="label…
-
0
votes1
answer53
viewsSpring security - Some questions
I am implemented spring security, in the application. You are logging in correctly, logout too. In the pages below only enters if you have logged in with the scroll ROLE_ADMINISTRADOR. @Override…
-
0
votes1
answer67
viewsError Request Resource is not avaliable
I have this class in JAVA package br.com.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import…
-
0
votes1
answer175
viewsunmount objects in an array
I have a method of searching the bank that brings me the following result: Note that inside the Object[4] comes another array that contains People, People.. i would like you to return me just this…
-
0
votes0
answers55
viewsJSON is not returning with the accents
I am with a doubt that I do not know what else to do for him to come without mocking the accents, I have tried several ways to put note of the Spring dom Procudes UFT-8 no solution came handy.…
-
0
votes1
answer2275
viewsJSON parse error
I am developing a web application (Spring) and need to save a date in the database. I made a function Ajax to save the value, but I get the following error: JSON parse error: Can not deserialize…
-
0
votes1
answer55
viewsauto-populated form with the remaining data from one of the selected fields
I wanted to have a dynamic form where the only thing asked is the selection of a user u from a list of users passed to the model from a controller, the email and status fields should be…
-
0
votes1
answer72
viewsError executing JSF project
I am going up a jsf project, but give this error in the console. log4j:WARN No appenders could be found for logger (org.jboss.logging). log4j:WARN Please initialize the log4j system properly.…
-
0
votes1
answer48
viewsError while listing data in Datatable
Good morning, I’m trying to make a simple listing of a table on a primefaces datatable, but they’re not listing anything. Follow code until the moment. .xhtml: <!DOCTYPE html PUBLIC "-//W3C//DTD…
-
0
votes1
answer545
viewsAccess image from Resources spring
I have the following scenario: I have the srping-Servlet.xml file with the following configuration: <beans xmlns="http://www.springframework.org/schema/beans"…
-
0
votes0
answers54
viewsCss file with image inside
Person I’m trying to set inside css an image, for this I’m using: body { margin: 0px; padding: 0px; background: #C0C4C5 url(images/page-body-bg.png) repeat; font-family: "Trebuchet MS", Arial,…
-
0
votes0
answers44
viewsI’m trying to upgrade from spring security 3.0.5 to 4.2.3
I’m trying to switch from spring security 3.0.5 to 4.2.3 but I’m having a serious dependency problem. In this project I was forced not to use mavem or something like that. And the problem (I just…
-
0
votes1
answer49
viewssessionFactory null when trying to select in the database
Good morning,I’m using Spring and JSF. I wanted to query the database and return the data from a table, but in the method I do the search, when calling sessionFactory, it is null. I really couldn’t…
-
0
votes2
answers103
viewsDoubt in Selectonemenu Primefaces
I have a Selectonemenu in my xhtml view. I have an onchange in it that when clicking calls a p:dialog to fill out a form. Follow selectOneMenu <p:column headerText="Mecânica"> <div…
-
0
votes0
answers207
viewsDoubt JSF Dialog + Selectonemenu
Hello, I’m trying to open a dialog with a selectonemenu, depending on what the user selects. My Selectonemenu looks like this <p:column headerText="Mecânica"> <h:commandButton>…
-
0
votes1
answer495
viewsHow to generate a dynamic link within a condition in Thymeleaf?
I would like to know how I can generate a link within a condition in Thymeleaf. In my situation, if the condition is not satisfied, I wanted to create a link that would direct to a new form, in…
-
0
votes1
answer192
viewsCreation and editing in the Spring Framework
I recently started to learn Spring, along with the Thymeleaf template engine for data display. However, I have been facing some problems that I cannot solve: When editing the Star Wars Movie entity,…
-
0
votes1
answer88
viewsError 415 - Upload files
pom.xml <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.3.3</version> </dependency> Angular,…
-
0
votes1
answer217
viewsSpring boot error - Liquibase
18-04-15 23:10:21.452 INFO 9464 --- [ restartedMain] o.apache.Catalina.core.Standardservice : Stopping service [Tomcat] 2018-04-15 23:10:21.470 INFO 9464 --- [ restartedMain]…
-
0
votes1
answer28
viewsAngular and Spring system for type approval
We have a VM on Azure. I managed the homologation build and put it on the server. Generated the files and index.html like this <!doctype html> <html lang="en"> <head> <meta…
-
0
votes1
answer1579
viewsImport github project into STS (Spring)
I’m having a hard time importing a spring project from github, and I can successfully import the project when it’s eclipse Oxygen from the java perspective (Desktop). Procedure used for importing :…
-
0
votes1
answer200
viewsHow to use Files.move with Java?
I have created a photo upload on my system, these photos are saved in a temp , I need to move them to a default directory, other than temp. This is the method that creates the directory : public…
-
0
votes1
answer138
viewsReactive Database Connection
I am developing an app with Spring Boot and I have a configuration class that generates a @Bean Datasource. I would like to generate alternative connection levels of connection to the database, as…
-
0
votes1
answer737
viewsSpring Data JPA - Query via Specification - Manytomany and Join with Multiple Entities
Hello, I’ve assembled the following Specification class: public class ItemVendedorSpecification implements Specification<ItemVendedor> { private static final long serialVersionUID = 1L;…
-
0
votes1
answer234
viewsHow to take user image in session and add to html?
I’m developing a web application using spring boot. I already have saved image of the user in the database, now I would like to assign the image of the user logged in the session in the profile…
-
0
votes1
answer847
viewsJava - Query Spring with current date
I have the following repository with the following method @Query("SELECT m FROM Money m WHERE m.data = CURRENT_DATE()") Money findTop1IfHasMoneyInCurrentDate(); My money class is like this: @Entity…