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
-
1
votes1
answer705
viewsUnit Test Controller Spring with Mockito
I’m trying to test the method below my controller: @RequestMapping(value = "/listar", method = RequestMethod.GET) public ModelAndView iniciaTela(ModelAndView model, HttpServletRequest request){…
-
1
votes1
answer3128
viewsError 'Noclassdeffounderror: org/springframework/boot/context/properties/Configurationpropertiesbean'
I am trying to make an application with several packages and using spring cloud with Eureka in java, but this exception. org.springframework.beans.factory.BeanCreationException: Error creating bean…
-
1
votes0
answers258
viewsHow to configure the Heroku procfile to find the application path that is not at the root of the project?
I have a springboot application in the git repository with the following configuration: /api .gitignore Procfile README.md However when I try to do Deoloy on Heroku I get the following error: ! No…
-
1
votes0
answers82
viewsHow to set up CORS in Springboot?
Recently I decided to try developing in java with Spring boot. I’m not very experienced in this framework. I tried to make a complete application, with back-end with this technology and front-end…
-
1
votes1
answer170
viewsWhat is the best way to edit an entity with Spring?
In my Controller I have the following mapping to display a person’s registration edit form: @GetMapping("/mostraEmpresaEdicao/{idpessoa}") public ModelAndView…
-
1
votes1
answer52
viewsHow to get around the use of reserved database words with Hibernate?
I am learning to work with REST API in Java using spring with Hibernate and I have the following problem. My entity has the name user which is a reserved word in the database I’m using(postgres), so…
-
1
votes0
answers12
viewsSpring and Dynamic Datasource
I have two database Structures, example: 1- MAIN_DATABASE: USER PASSWORD 2: CUSTOMER DATABASE: CUSTOMER_A CUSTOMER_B CUSTOMER_C I want to access the main database and after validating the data,…
-
1
votes1
answer46
viewsHow to change the result of requesting a Rest API with Spring?
Eai guys, all right? I started studying Spring recently on my own and am trying to create a Rest API for enrolling students and exams at a school. I have the following problem: When I make a GET…
-
1
votes2
answers115
viewsHow to send a formatted Zoneddatetime in JSON?
I need to send the following: "tempo": { "inicio": "2019-06-24T20:00-03:00[America/Recife]", "fim": "2019-06-25T00:00-03:00[America/Recife]" } I created the two dates in my pojo: @Data…
-
1
votes1
answer105
viewsJava Spring Rest does not work with separate packages
Personal my spring Rest application only works when I put the classes(models,controllers) all in the same application class package, this way it works but imagine the disorganization of it !!…
-
1
votes1
answer23
viewsSpring boot application.properties problem
This is my application.properties file. ############################################################################### # PORTA…
-
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
answer422
viewsValidation of input triggering 400 error with Spring MVC
Guys, there’s a boring mistake that I’m losing sleep over to figure out how to treat. Well, every time I perform my test by checking the validation of my field an error 400 and fired. I don’t know…
-
0
votes1
answer3632
views -
0
votes1
answer73
viewsDetails with @Autowired and Down object
There’s been a conflict of concepts with me. I have here a service called: AtividadeService There are some lines that catch my eye: import com.dendetech.entity.Atividade; Why import Entity? If it…
-
0
votes1
answer113
viewsSimplejaxwsserviceexporter - Baseddress
I created a web service with JAX-WS and used Spring to put it online and also to decrease the use of XML. Problem is that when I declare the Simplejaxwsserviceexporter in the Spring configuration…
-
0
votes0
answers40
viewsNo Session found for Current thread
I am having trouble performing a test to add a user with profile! My problem is the method addUser. Code of the test class: public class AddUser { public static void main(String[] args) {…
-
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
answers161
viewsError creating Springmvc bean
I’m new in Java and I’m doing several online courses and trying to develop on my own, to train, but I came across a mistake that I have no idea how to solve. Error creating the bean:…
-
0
votes0
answers350
viewsAngularjs and JSTL Master-Detail
Good afternoon, you guys. Next, I’m using Angularjs to add the details of a sale, but on the server side I’m using Spring MVC with JSTL foreach the details to add on the server. HTML that rescues…
-
0
votes1
answer91
viewsError when injecting Service within a @Component
Set an example bean: @Component public class SimulationModelFactory { and within the class I am injecting my service example: @Autowired private SimulationFlowService simulationFlowService; Service…
-
0
votes0
answers383
views@Retryable and @Async com spring
It is possible to create an asynchronous method that can be tried again if some exception occurs with spring? @Retryable @Async public void myMethod() throws Exception { // Do some stuff }…
-
0
votes2
answers732
viewsREST in Java Spring project does not work
I created a project in the Spring Tool Suite to test a web and REST system, in the same project, worked well to create a static html page and load in the browser, but I created a java class for GET…
-
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
answer150
viewsHow to send object as attribute from another JSP object to a Spring controller?
Hello, I have a class News story related to Manytoone with a class Secao. The Noticia class has an attribute of type Secao (where the @Manytoone relation occurs). I would like to know how to, in the…
-
0
votes1
answer345
viewspom.xml in Spring is not working!
Independent of the boot version keeps giving me error. could someone help me solve these pom problems?…
-
0
votes1
answer89
viewsWeb Page Optimization with Java
What should I look for to optimize performance on the front end, to minimize css, js etc. keep the head and change only the body? Using Java and Spring MVC, or with Play and Sparks for example.…
-
0
votes1
answer181
viewsHow to catch multiple JSON Arrays on a JSON Array with Rest Template?
Hello, I am having collect information from various JSON’s Array within a JSON Array, which follows below, with Rest Template: { "dataset":{ "id":10051093, "dataset_code":"SN2017",…
-
0
votes1
answer23
viewsSelect manual in repository using Spring?
Hello, I wonder if there is a way to make a select within the Repository, I’m using Spring and REST, I need to return all entities that have another entity, I would take them by id, and I need to…
-
0
votes1
answer46
viewsSpring capture and errors
next... I’m using spring for a particular project and wanted to know how to best capture errors. have my Repository classes: @Repository public class PrimeiraClasseDaoImpl implements…
-
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
answers410
viewsSaving jpa objects in spring transaction
Good morning, there has been a problem in the application that I work when I persist the object in the database I see the jboss log showing the Insert instruction plus the id of the object remains…
-
0
votes2
answers461
viewsHow to customize Tomcat log in spring boot ?
I’m having a little problem with my application, the log of my Tomcat is generating a medium large amount of data, and this is slowing down the application of the company, I wonder if there is any…
-
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
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
votes1
answer55
viewsTransaction in the Spring
I want to know more about transactions in spring. I have the following structure: My Service: @Service @Transactional public class MinhaClasseServiceImpl implements MinhaClasseService { @Autowired…
-
0
votes1
answer46
viewsJpanel disappearing while getting a get on it
I am building a layered application using the Spring Framework, I am new and well be doing it the wrong way. My problem is this, as you can see in the image below I have the PrincipalFrame and the…
-
0
votes1
answer119
viewsSpring Batch Skippolicy, what’s it for?
I wonder what the Skippolicy which is set in Stepbuilderfactory. If possible would like some documentation explaining.
-
0
votes1
answer279
viewshow to create a bean that returns an entityManeger
am using springboot + ejb + cdi + wildfly10 already created the datasource and configured , I went to the interface wildfly and DS is connecting normal. Dao @Repository public interface PessoaDao…
-
0
votes2
answers208
viewsWhen no file is found, you should skip to the next step (Spring Batch)
I’m using Spring Batch. In my Job, I have several steps, and they all read from a file. csv. The problem is as follows, there will be times when the file . csv will not be in the available location…
-
0
votes1
answer53
viewsProblem to persist data in the database
follows the error I am taking at the time of persisting the data: 09:19:29,437 ERROR [io.undertow.request] (default task-7) UT005023: Exception handling request to /sic/usuario/salvar:…
-
0
votes0
answers80
viewsWhen I run Update the eclipse for execution
When arriving at the part that executes the following query the system stops and does not proceed to the next line. @Query(value = " UPDATE COOBILING_NUMBER SET CONDITION='Used' WHERE NUMBER_PHONE=…
-
0
votes1
answer317
viewsMap Home Page Springmvc
Hello! I would like to map a home page using springmvc I have this method: Man Controller public class Treinamento { @RequestMapping("/inicio") public String inicio(){ return "index"; } } in my web…
-
0
votes1
answer2523
viewsJsonformat changing date on a get request
I have a java web service using Spring Boot, in a class I have a date attribute and I use Jsonformat to format the date and convert on the client side using Gson. However, even defining the locale…
-
0
votes1
answer125
viewsSpring mvc bootstrap
Galera is the following I have a record that I get with the bootstrap select element and I select it and I need to put a button to add this record in a table below that on the same page where the…
-
0
votes0
answers219
viewsError while running Maven Tomcat
I’m giving a study on Spring used the Maven, while trying to run the Tomcat with the command mvn tomcat:run gives an error that does not happen when I run it in Tomcat7 configured in Eclipse. That…
-
0
votes1
answer1064
viewsConsuming REST in Wordpress
Good morning! I implemented a Rest API with Spring and would like to consume it on a site within Wordpress. This is done through Plugins or direct with code within the Post? For a Post Request, how…
-
0
votes0
answers38
viewsJavascript not recognized by Chrome
I’m having problems using Spring MVC, Google Chrome and Javascript. Every time I create a new Javascript file, in my project using Spring, the browser does not recognize this file. I’ve cleared the…