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
-
20
votes1
answer1876
viewsRequests for Rest API
The application uses Spring Rest in which the paths of a CRUD are automatically generated for each entity, I have the entities Vehicle, Contact and Agency and each one with its respective…
-
18
votes2
answers4712
viewsHow to create Permissions (Permissions) instead of Roles (Roles) in Spring Security?
I am developing an Access Control module for my web application using Spring Security (3.1.4 - the latest release) and ran into a limitation in the mechanism of Authorization, as the framework only…
-
16
votes3
answers2459
viewsHow useful are Java Annotations?
When I first studied Java, when I saw about Annotations I only saw that they are useful for generating metadata, but I didn’t see anything that influenced the behavior of the program. Basically, I…
-
12
votes1
answer3396
viewsHow does authentication with digital certificate work?
I want to authenticate via digital certificate in a web application. I have been able to read the data of my digital certificate that is connected to my machine. The question is: "How to…
-
11
votes2
answers3452
viewsInstantiating interface - What’s the point?
I learned in college and in all the materials I saw that the interface serves to define a pattern that classes should follow and interfaces CANNOT be instantiated. However I came across projects…
-
9
votes1
answer817
viewsSpring Security, display message when log out
I am controlling the session of my application with Spring Security, I have two rules to end the session, max-Session <session-management> <concurrency-control max-sessions="1"…
-
9
votes1
answer10051
viewsWhat is the difference between @Postconstruct and the constructor?
What’s the difference of using the annotation @PostConstruct instead of using constructor method and its advantages? I ask based on these two versions of the same class that only differ by this…
-
9
votes1
answer1020
viewsThe name of the dt_ultimo_access column was not found in this Resultset
I’m deploying a method passing an id parameter: @RequestMapping(method = RequestMethod.GET, value = "/entidadesUsuario/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public…
-
8
votes1
answer1111
viewsHow to ensure transactional atomicity in more than one concurrent Thread in a Java SE environment using the Spring framework?
A Java SE solution, using the Spring framework, is being developed in order to parallelize the execution of a Stored Procedure in Oracle 9i, Procedure which takes as parameter one or more lines of a…
-
8
votes2
answers226
viewsWhy does Value in Spring MVC need an asterisk?
Why do I need to put * no value when there is nothing else? I mean, before using Spring MVC worked smoothly only as /planilha/. The getPlanilha works properly but if it has the same RequestMethod…
-
8
votes2
answers621
viewsDynamic scheduling of tasks with spring batch + Quartz
I have a project in Spring Batch + Quartz, which loads a file and then processes the data from the file. Only that I wanted to implement a view with a form where I had the option to choose the start…
-
7
votes1
answer971
viewsController and service annotations
In Spring 3 there are class annotations @Component, @Service, @Controller and @Repository. I know that the @Component is the only one that can be used in all cases (Controller, Service and…
-
7
votes2
answers1757
viewsHow to receive a List (Java) in Javascript, using Spring MVC?
I have a web application using the Spring MVC framework. I need to receive a List in a Javascript function, but I don’t know the best way to do this, without getting the code confused. The Processes…
-
7
votes1
answer99
viewsPersistent Hibernate Resource Return
Good afternoon. I would like to understand how to resolve the following issue: In the project I’m working on, Backend and Frontend are separated. To persist the data I am using Hibernate and to…
-
6
votes1
answer332
viewsSpring MVC + Joda Time + @Datetimeformat
Description: The Spring does not convert using the @DateTimeFormat, try to order the start of the two forms below and it returns to me a 404. When I send the object without this field it creates the…
-
6
votes2
answers7668
viewsWhat does the @Component annotation do?
What Spring actually does when we write it down @Component in a class? How does it work "underneath the scenes"
-
6
votes2
answers12870
viewsHow to consume an external API in Spring Boot
I have a springboot REST application that needs to extract information from another application. How I make this communication and can extract this data?
-
6
votes0
answers180
viewsSpring Websocket multi user chat with sound
I’m trying to develop a real-time chat, with the following scenario. Online clerk Every user he meets is a conversation One to one An attendant sees all users on a list that he is attending. When he…
-
5
votes1
answer12035
viewsOperation of the Spring Framework @Transactional
1 - The Spring documentation describes the use of @Transactional Spring in the business rule classes(ProdutosService for example) there is some special reason to use this annotation in these classes…
-
5
votes1
answer154
viewsGetting Factory null in spring sessionfactory with configured resource
The name of the class containing the SessionFactory is DataProvider and has the following implementation: @Resource(name="sessionFactory") protected SessionFactory factory; protected Class<E>…
-
5
votes1
answer1659
viewsHow to handle security in a REST application with Spring?
I would like to know how I could treat the security of a stateless REST application with Spring. Imagine that no user can access any content from /app/content if you have not identified first. There…
-
5
votes2
answers1286
viewsMultiple Persistence Units with Spring Data
You can create multiple Units persistences by connecting to separate databases in the same JPA application using Spring Data? For example. I have an application that will run in Mysql normally.…
-
5
votes1
answer612
viewsIn Spring MVC, how to send information to the view (.jsp) without using Modelandview?
I am developing a web application in Spring MVC. I have a method that returns a list (java.util.List) and I need to pass it to the view (.jsp), but without updating the page. I would like to know…
-
5
votes2
answers18970
viewsHow does Hibernate.hbm2ddl.auto work?
What values can I use on this property? ex: Update <prop key="hibernate.hbm2ddl.auto">update</prop> How does it work? When should I use? is good practice?…
-
5
votes1
answer248
viewsjava.lang.Illegalstateexception when declaring aspect with Spring
I’m trying to state this aspect: @Aspect @Component public class UpperCaseAdvice { @Before("@target(annotations.Model)") public void toUpperCase(JoinPoint joinPoint){ //faz alguma coisa } } I am…
-
5
votes1
answer711
viewsConvert String Ex. 1.520.30 to Bigdecimal using Spring MVC @Initbinder
I have a canvas on which I work with the monetary value masks of jQuery Mask, when the user performs the Submit of form the value returned to my controller is Ex:. 1.340,34. The attribute in my Bean…
-
5
votes1
answer230
viewsSpring and EJB have the same features?
Spring and EJB have the same features? If not, you can use both in the same application?
-
5
votes2
answers771
viewsHow to hide menu items using spring security?
I am using spring security to control access to my web application. I have already managed to implement the control that each type of user will have in relation to the urls, now I would like to hide…
-
5
votes1
answer93
viewsCheck if user is logging in from within the company
I will not go into details of the technology used, because the doubt is more on the best way to resolve this situation. I have the following scenario: Company with several subsidiaries; These…
-
5
votes1
answer396
viewsHow to expose a bean method to use spring dependency injection
I need to expose a method like a bean on ApplicationContext of Spring to use it in the injection of an attribute, which has more than one implementation. What I did was the following: I added the…
-
5
votes2
answers239
viewsGET request is not answered correctly by backend
The project is an Angular 6 front-end, which connects to a Java back-end for communication with a SQL Server BD. The server that receives the file .war, containing both the back and the front, is…
-
5
votes1
answer496
viewsDisable Flyway migrate on startup and run only when requested
I’m just getting started with the Flyway in the Java along with the Spring Boot and I currently have an activity that tells me to do the Flyway execute the migrate() only when a certain endpoint is…
-
4
votes2
answers4977
viewsUsing the JPA repository
Last Saturday I presented my TCC in college and saw that I need to improve the presented project. The system receives tax notes in format XML and manipulates them. I based the system on the company…
-
4
votes1
answer263
viewsIntegration between Spring and JPA
I recently started studying one of the most amazing frameworks I’ve ever known, Spring. I always make good progress in my studies, I’m already studying the integration of Spring with data access…
-
4
votes1
answer1381
viewsWhen should I use the @Enableautoconfiguration annotation and how does it work?
The Annotation EnableAutoConfiguration should be used in what type of project? and how it works in the application?
-
4
votes1
answer1034
viewsSpring Security without authentication
I have a system that already authenticates the user, and controls access to pages that require authentication, I need to use spring security to control access to pages by user rules and to control…
-
4
votes1
answer824
viewsCreate Dto by Constructor with a List parameter of a Hibernate entity
I have a @Query Spring, which performs a database query by an Entity, to create some Objects DTO. And the properties of this DTO object, I pass via Constructor, but I needed to pass as parameter in…
-
4
votes1
answer554
viewsInjection of Beans Spring into JAX-WS / Tomcat 7 (@Webservices) - Does not work, returns Nullpointerexception (NPE)
I’d like to inject (@Autowired or @Resource) Beans created by Spring (3.x or 4.x) in a class that implements a JAX-WS interface (reference implementation). I tested on Tomcat 6 and it works, but on…
-
4
votes2
answers9897
viewsWhat is JPA’s mappedBy for?
Example: @OneToMany(mappedBy = "chemical", fetch = FetchType.LAZY) @LazyCollection(LazyCollectionOption.EXTRA) @JsonIgnore private List<SimulationChemicals> simulationChemicals; Why is the use…
-
4
votes1
answer528
viewsProblems Implementing Spring Security
I am implementing Spring Security in a project, however, I have come across some problems. I will put the code of contexts, the part of web.xml for Spring Security and how I put it on a page for you…
-
4
votes1
answer893
viewsI cannot ignore fields when trying to return them as Json causing "Infinite recursion"
I’m working with Hibernate, Spring and Jackson (to ignore fields) and when trying to return the class User in a json request java returns error due to mapping @Onetomany and @Manytoone with class…
-
4
votes1
answer987
viewsNotifications with Spring
how to implement a system of notifications that receive an example notification counter in real time: My question is that when it is inserted there in the bank one more line and go from 4 to 5…
-
4
votes1
answer380
viewsProblem with Spring Security - page not located
When the user accesses a page that he does not have authorization for, it is to be directed to the page of AcessoNegado.xhtml. But it presents the following image: This page is located here:…
-
4
votes1
answer879
viewsSpring boot Data-JPA and JSF Java Config
I am setting up a project using Spring boot for ioc and Data-Jpa along with JSF however I have a problem with @Autowired my DAO is not carrying. Does anyone know how to do that configuration and…
-
4
votes2
answers6465
viewsHow to return a list as JSON using Spring MVC (@Restcontroller)?
I want to return a list in JSON format using Spring, but I am not succeeding. At pom.xml I added this dependency: <dependency> <groupId>org.codehaus.jackson</groupId>…
-
4
votes1
answer4499
viewsOpen modal with Javascript to select certificate and send to server
When we enter the page eCAC - Virtual Call Center and we click on Digital Certificate on the right side of the screen a modal is opened to select certain certificate that we configure in the system…
-
4
votes2
answers1052
viewsCannot pass a null Grantedauthority Collection Spring Security
I am developing a web application with Spring Boot, and I am trying to implement authentication using Spring Security. I am following the tutorial from Michelli, but I’m making the following…
-
4
votes1
answer2803
viewsConvert Localdate to Localdatetime
I have in my Filter class the following attributes: private LocalDate periodoDe; private LocalDate periodoAte; However, the object in which the information is located the attribute that will be…
-
4
votes1
answer1008
viewsStackoverflow in bidirectional relationship at JPA
I’m facing this problem with a bi-directional relationship, when I put in a question to create an answer it makes persistence, even then beauty, but if I try to get a get or even in the answer the…
-
4
votes4
answers4853
viewsWhat kind of return of a select Count(*) in Spring JPA?
I need to know the type of return that Spring JPA returns to put in the Service package, because it is giving a NullPointerException: Dao: public interface PlaylistDao extends…