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
-
2
votes0
answers119
viewsJoin with Specification
I have the following query: SELECT tab1.nom_shopping, tab1.nom_fantasia, tab1.luc, tab1.dat_vencimento, tab1.num_boleto, tab1.val_saldo_aberto, tab2.num_cpfcnpj negativado,…
-
2
votes1
answer93
viewsWhy does my synchronized method not work as expected?
I have a class called GerenciadorServerSocket: @Service public class GerenciadorServerSocket { private CopyOnWriteArrayList<Integer> portasUsadas = new CopyOnWriteArrayList<>(new…
-
2
votes0
answers114
viewsREST Service within a Web Application
I have a web application with Spring MVC and there is a need for a client to consume a service, so I created in the same project a resource mapped with Restcontroller, when testing the service using…
-
2
votes1
answer33
viewsAccessing resources with spring
Hello. I am having some problems recovering an image in a folder of my project. Here is a basic explanation of what I am trying to do: In my application a form is submitted and next to it an image…
-
2
votes2
answers66
views -
2
votes1
answer132
viewsHow to map a Map in Hibernate
I’m trying to map a diary to an apprentice, where in the diary I have a Map<data,mensagem>, that is, the date that was created and its respective message, but with the mapping that I did, I…
-
2
votes1
answer325
viewsEnum error with JPA + Hibernate
When performing a query in the database with JPA + HIBERNATE the following exception shall be made: java.lang.IllegalArgumentException: Unknown name value [Respondido] for enum class…
-
2
votes2
answers2620
viewsHow to resolve? No converter found capable of Converting from type [java.lang.String] to type [@org.springframework.data.jpa.Repository.Query]
So Guys I’m having a problem when performing a query through a @query, well basically what I need is a list of a status column in the bd that returns only students who are with the status "Finished"…
-
2
votes1
answer120
viewsHeritage is slowing the startup of my SPRING BOOT application
I’m working on an automatic text messaging system, in my class hierarchy I have an abstract class at the top called TaskNFSBusiness which sets the rules for messages that are not in real time, it is…
-
2
votes1
answer1199
viewsHow to Map One to Many Correctly in Hibernate
Good afternoon, I am creating a very simple Restful API that implements an online course system, where I have only 2 tables "Courses" and "Teachers" (And I am trying to learn Latin in the process):…
-
2
votes1
answer258
viewsRequest made to Spring Boot is returning another endpoint API
I set up a test scenario to treat an error that was happening on my frontend. Situation Problema: The problem was that I was making a requisition for a route ‘/api/v1/telefones’, Spring ends up…
-
2
votes0
answers85
viewsDoubts about authentication for a Java application with Spring Security (stateless)
I will start a new project and came to doubt regarding the best way to work the authentication/authorization part. The project will be developed in Java with spring (boot), backend and frontend…
-
2
votes0
answers115
viewsRedirecting HTTP requests to HTTPS in Spring Boot - (Wildfly server)
I want to deploy a Spring Boot app in Wildfly that features HTTP request forwarding to HTTPS. Here is the application.properties: server.port=8443 server.ssl.key-alias=https-example…
-
1
votes3
answers364
viewsHow to get the class name where a bean will be injected?
I am configuring two Beans in the file beans.xml to inject Loggers into my classes. <bean id="loggerFactory" class="company.LoggerFactory" /> <bean id="logger"…
-
1
votes1
answer262
viewsUnable to locate current JTA Transaction
The project is divided into the following modules: test-persistence; test-services; web test; I use Glassfish 4 as an application server and it has a connection pool configured for connections to…
-
1
votes1
answer605
viewsValue sent to JSP via Spring Model does not appear
I’m developing a project using Maven, Spring framework(mvc module), and database searches through JDBC. I have the following code in my controller: @RequestMapping("/authors/edit") public String…
-
1
votes1
answer698
viewsSession is closed! Spring + JPA (Hibernate)
I’m trying to make an example of JPA + Spring. But I’m having trouble managing transactions. persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0"…
-
1
votes1
answer911
viewsMaven Project - Click on Tomcat, but do not run
I have a project from Maven which, although the messages displayed on the Eclipse terminal inform that the Deploy was successfully done. When I type the URL into the browser, I get a 404 error; then…
-
1
votes1
answer4138
viewsConsume REST service using Spring Framework
I am developing a web application, using Spring Framework. And I need to consume a service from another application. I know how to send requisitions POST, through using jquery and ajax, but I want…
-
1
votes2
answers396
viewsHow to create a stored Postgresql database from a Java source
Searching the internet for a solution to create a database on a Postgresql server for my Spring project, I found the following topic on Stackoverflow:…
-
1
votes1
answer975
viewsHow to test a DAO (using Spring and JPA) out of a container?
I am developing an application with JPA 2, Spring and JSF 2 running in Wildfly 8.0.0. I have developed some previous applications following this same specification but never tested properly using…
-
1
votes1
answer180
viewsIs it safe to trust the security of an application to Spring Security?
I am developing a fairly simple but widely distributed system that involves including use of Ejbs and other agents, which requires both Authentication and Authorization. The system will initially…
-
1
votes3
answers490
viewsWhy not use an Application Container like Jboss when using Spring?
Whenever the use of Spring is discussed together with Jboss or other container, professionals tend to question why use a container of JEE applications. So I ask myself, why not use it? Would it be…
-
1
votes0
answers118
viewsHibernate Soft Delete Spring Boot Behavior
I wonder if there is soft delete functionality in Hibernate, because today I am doing in a way that I consider gambiarra, something to type: @Entity @Where(clause="ativo=1") Controller: Rejeicao rej…
-
1
votes1
answer117
viewsBest Way to Provide Sessions for DAO’s
I was researching on the internet ways to inject Sessions in the DAO’s this: Hibernateutil This way is to implement a utility class that will configure, instantiate and make available an object…
-
1
votes1
answer1481
viewsConfigure Spring applicationContext by taking advantage of other configuration files
I got the following hibernate.cfg.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"…
-
1
votes1
answer481
viewsChanging the status of a checkbox component in the database using AJAX
very good evening to all! Well, I have a table in which there is a checkbox component. This component has the task of enabling and disabling a destination on my website. The figure below shows a…
-
1
votes1
answer470
viewsHow to redeem a key in a Json using Gson (Google)
good night. For the first time I am manipulating a Json file with Java, because many colleagues have always told me that it is very easy to manipulate data, especially with the Google library…
-
1
votes1
answer934
viewsWhat is the Dispatcherservlet function in Spring?
What is the purpose of it? it is recommended to use spring-boot to make all spring xml settings automatically?
-
1
votes1
answer4739
viewsorphanRemoval JPA
How orphanRemoval works? Why when I put it on a list does not work ex: @OneToMany(mappedBy = "simulationMedia", cascade = CascadeType.ALL, orphanRemoval = true) @JsonIgnore private…
-
1
votes0
answers159
viewsInstability recovering updated objects list
I am facing problems with Hibernate that seems to be related to the cache object. I have an entity, let’s call it A, with an attribute mapped list with @OneToMany (cascade = CascadeType.ALL,…
-
1
votes1
answer457
viewsError in applicationContext-security.xml
My first xml file applicationContext-security.xml: <?xml version="1.0" encoding="UTF-8"?> <b:beans xmlns="http://www.springframework.org/schema/security"…
-
1
votes2
answers402
viewsRedirect JSF error
I am trying to pass two parameters to another example page: <p:commandButton icon="ui-icon-pencil" action="form?faces-redirect=true&id=cargo.id"></p:commandButton> But this error…
-
1
votes0
answers69
viewsHow does mock work in integration testing?
How to use mock in my integration tests?
-
1
votes1
answer137
viewsOne controller method works correctly and another similar returns error
I have two Controller files and two JSP files with the same structure. In JSP I have the following structure for AJAX: $.ajax({ method: "POST", url: '/modulo1/funcao1', data: { 'atributo1':…
-
1
votes0
answers138
viewsError Wrong number of Arguments in production environment
I have an application in development and production, and only in the production mode this presenting the following error: [0m[31m13:11:45,758 ERROR [io.undertow.request] (default task-118) UT005023:…
-
1
votes0
answers278
viewsProblem with properties Spring MVC 4
Well the error happens in the second message from the file "properties" the first ok message when I try to put the second the message in the file happens this error Caused by:…
-
1
votes1
answer340
viewsProblem with @Autowire Spring + Hibernate and Junit
Good evening, I’m trying to create a project using Hibernate and Spring, I was successful creating some configurations, including I was able to generate the database by booting the application using…
-
1
votes1
answer1131
viewsWhat’s left to configure with Spring boot?
The settings I use with spring are based on Java class, as in this example https://github.com/matheussilvasantos/autocomplete. If this project used the spring boot, what settings would still be…
-
1
votes1
answer104
viewsMethods to test Spring application are not found
I am following the following article: Introduction To Spring MVC Test Framework I have the following code: this.mockMvc.perform(get("/product/1")) .andExpect(status().isOk().…
-
1
votes1
answer2928
viewsNo Qualifying bean of type found for dependency
I searched Stackoverflow and Stackoverflow in Portuguese but nothing guaranteed the solution to the problem. I have been through this problem several times but at the moment I do not find the…
java spring maven tomcat dependency-injectionasked 8 years, 9 months ago Giancarlo Abel Giulian 3,999 -
1
votes1
answer223
viewsSpring MVC Security - Web config.xml does not open page
I am trying to implement Spring Security in my project, but I am facing the following problem. When I add tags to web xml., the project does not even load the initial page, already starts with error…
-
1
votes2
answers3824
viewsPaging with Spring Framework
I have a question, I need to make a pagination when I return all the records of a table, I don’t have much experience with Spring and I would like to know how it is done, I need to overwrite…
-
1
votes1
answer5525
viewsSpring Boot error 404
Hello, I am studying Spring Mvc and Spring Boot and I came across a following problem that so far I could not identify. After executing my main method I get the following message. Whitelabel Error…
-
1
votes1
answer1325
viewsError in Spring Project Execution
I’m developing an application in Spring (from the Algaworks booklet) and came across the following error: . ____ _ __ _ _ /\ / ' __ _ ()_ __ __ _ \ \ \ \ ( ( )_ | '_ | '| | ' / ` | \ \ \ \ / )| |)|…
-
1
votes1
answer121
viewsReceive HTML Table in Controller (Springmvc)
Good morning, I have a page where the digital user 3 information. <input type="text" id="info01"> <input type="text" id="info01"> <input type="text" id="info01"> When typing the 3,…
-
1
votes0
answers89
viewsproblems with @Injection
Hi, guys. I’m creating a program that manipulates human and livestock records. In this program, on the livestock register screen, I am creating two Selectonemenu of the first faces. One is of type…
-
1
votes2
answers445
viewsDependency Injection - Two objects implementing the same interface
I have two objects from the Amazons3uploadservice classes and Databaseuploadservice and both implement the Uploadservice interface. The uploading class has the two objects injected by the Spring…
-
1
votes0
answers166
viewsSpring Security and Shiro -> How to authenticate a user in Security and pass a token to Shiro
I have two web apps: the first web application is using Spring MVC and Security and makes user authentication in the database. And works very well, thank you. The second web-app are using Shiro for…
-
1
votes1
answer225
viewsSpring Security Oauth + Firebase
Good afternoon. I’m implementing the security layer of my application. I decided that we will use Firebase to perform the authentication, and when it returns the access token to the client it will…