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
answer45
viewsResttemplate error
Guys I’m trying to perform a query in a time forecast API but whenever I will perform the query give me this exception Servlet.service() for servlet [dispatcherServlet] in context with path [] threw…
-
0
votes0
answers18
viewsBean Jsonitemreader, xml configuration
My Reader will read a json that comes from a Rest api. The project is configured in xml, IE, the settings are in an xml file, where are the other Beans. I found in the documentation, a bean that…
-
0
votes0
answers29
viewsAnnotation java + spring boot
I need to take an attribute of an object and modify its value via Annotation, for example: public class MeuDTO { @AlgumaAnnotation private String meuAtributo; } I created the note:…
-
0
votes0
answers220
viewsError when running unit tests of Repository
Previously the test worked and after a while stopped working. The structure in the database was not changed. get the message: Failed to load ApplicationContext java.lang.IllegalStateException:…
-
0
votes0
answers47
viewsRequest for Resttemplate spring
I am trying to make a request for a get type starWars api to the following url = https://swapi.dev/api/planets/3 The codes stayed that way: @Log4j2 public class SpringClient { public static void…
-
0
votes1
answer46
viewsToken does not validate request
I’m following a spring course that’s possibly a little outdated. But I’ll get used to it. The thing is, right now, I have a problem that I can’t solve/understand. I make a token request, I receive…
-
0
votes1
answer283
viewsJsonformat with Localdatetime springboot
Hello, I am trying to record in the bank only the time of the attribute of my Entity, I put @Jsonformat(Pattern = "HH:mm:ss") but the error when it will record Resolved…
-
0
votes1
answer33
views -
0
votes1
answer124
viewsHow to make a user changes with the PUT method in Springboot
I’m doing a project and we’re in the API layer with Springboot. We have a problem with the verb PUT. We have the fields Id, Name, password, Tipousuario, password, so far so good, we are doing an If…
-
0
votes0
answers24
viewsTrouble with Rabbit and Spring
Talk about beauty? I’m having a problem using my application with Rabbit via Docker. Here’s what you get: I created a Docker-Compose, it follows: version: "3" services: rabbitmq: image:…
-
0
votes0
answers59
viewsDocumentation with Swagger
Hello, everyone. I’m having trouble analyzing my documentation with Swagger. It just doesn’t show up anything but some HTML elements on my page localhost:8080/swagger-ui.html, how the image shows:…
-
0
votes0
answers123
viewsIntellij doesn’t recognize Lombok
I am having a problem using Intellij IDEA 2020.3.2. I am using Lombok in my spring project as follows: pom.xml: <properties> <lombok.version>1.18.16</lombok.version>…
-
0
votes1
answer41
viewsError in Docker-Compose.yml
Good evening guys, I’m having an error in Docker-Compose.yml, the error shown is as follows: and my code is this: version: '2.4' x-database-variables: &database-variables SPRING_DATASOURCE_URL:…
-
0
votes0
answers36
viewsHow to return a stream id?
I need to get the ID inside the findById, but I don’t understand how I can do it in stream. @Override public void run(String... args) throws Exception { //TODO ler argumentos com data e workflow de…
-
0
votes2
answers184
viewsi18n - Java Internationalization - Entity Validation Message
I have an app Spring Boot where I’m developing a system Web using Thymeleaf. The system has the translation functionality according to the language of the user, however, when using in the entity,…
-
0
votes0
answers13
viewsHow to overwrite findAll with Examplematcher Jparepository
I am making a findAll using Jparepository and Exemple (Examplematcher). Entity Cidade public class City implements Serializable { private static final long serialVersionUID = 1L; @Id…
-
0
votes0
answers39
viewsIs there an implementation standard that better organizes classes of business rules?
I’m part of a Spring Boot development team and the project is getting bigger and bigger. Our problem is that even separating methods according to their related entity, the service classes become…
spring spring-boot spring-mvc pattern-design optimizingasked 3 years, 8 months ago Marcos Vinícius Carvalho 9 -
0
votes0
answers36
viewsSet multiple initial paths for different packages in Spring Boot
I use: spring boot 2.2.4.RELEASE The need arose for me to use two different paths in my classes annotated with @Restcontroller @Requestmapping, today my application.propeties is as follows:…
-
0
votes2
answers20
viewsHow to recover object by URI by passing parameter and showing Request Status
I’m learning to work with Spring REST, I can already recover object by URL in Postman, but in my URL if I pass a parameter e.g.: http://localhost:8080/categories/50 It shows as status 200 OK if you…
-
0
votes0
answers28
viewsHow to Enter Into Spring Data in a Bi-Erect Relationship
I’m doing a back end study using the api SWAPI, I have already mapped the entities etc. But now I don’t know how to map to insert, for example: Entidade Film @Data @Entity public class Film extends…
-
0
votes1
answer77
viewsHow to create a custom annotation in Spring Boot and run it automatically when a method is called?
I would like to create my own annotations. For example; when a controller spring is called and it has my annotation, some validation is executed. @GetMapping @MinhaAnotacao(value="log") // Aqui…
-
0
votes1
answer36
viewsI can’t validate @Embeddable class attributes
I have validation problem in the Address class that is @Embeddable while trying to make a POST. When I put on null in the field nome that is of Pessoa for example, I can capture the custom message…
-
0
votes1
answer47
viewsManytomany jpa - Spring Save Relationship Entity Data
Good night, you guys! I have 2 classes: Services and Order. Services contain name and value/time. Request contains attributes: valueBrut, valueLike, percentualTime , user and a list of services.…
-
0
votes1
answer75
viewsSave daughter entity against Manytoone Hibernate Jpa
I have 3 entities: Request, Request and Service; There is a many-to-many relationship between the Request and Service entities so I created the third table; I would like to save a Request and also…
-
0
votes1
answer15
viewsI cannot create table when running my project in Flyway
I wrote in SQL my table in the file and I’m using flyway, I’ve created the class all right but when I go up the project does not create the table written and does not present any error. NOTE: I have…
-
0
votes1
answer199
viewsError Creating bean with name 'transactionController'
I’m starting to learn Spring and I’m getting this error, I’ve done several searches on the internet but so far I don’t understand what is causing the problem:…
-
0
votes0
answers29
viewsHow to make the spring batch Itemreader return a list by reading from a file
In Spring Batch does anyone know how to make Flatfileitemreaderbuilder return a list? Or if there is any other class that reads the file and returns a list? I have this Reader code: fun…
-
0
votes3
answers55
viewsUnsatisfied dependency Expressed through field 'cartRepository'
Good afternoon to everyone, I am taking a Spring course and using Redis, but I came across a mistake that has taken me many hours of study and so far I have not been able to solve it. Someone would…
-
-1
votes1
answer212
viewsPublication Error in Spring
I’m having trouble with this new version of Spring Sts. Version: 3.6.1.RELEASE Build Id: 201408250818 Platform: Eclipse Luna (4.4) I’m using Linux operating system(Ubuntu) Ttinha my projects working…
-
-1
votes1
answer34
viewsHow to pass a url to a server in java
I’m auditioning for my college project, and I’m having a problem. I create an object and pass all its data through the Tter and the constructor. When I call Service with the save method, it returns…
-
-1
votes2
answers790
viewsNull return for List<String> method
I have a method with return type List<String>, when a query is made I can return a value or nothing: public class Repositorio { @PersistenceContext private EntityManager em; public…
-
-1
votes1
answer61
viewsStarted’s Springboot Project but I can’t get Postman’s Apis
The start project but when I call in Postman nothing comes back, nor the error. It’s as if the project had not gone up! In pom.xml are the dependencies: jpa, mysql and web. I have not touched them.…
-
-1
votes2
answers322
viewsDate problem in spring boot + mysql
Good afternoon, I’m trying to make a findAll on spring boot because the date is coming with 1 day late. public List<ContaReceber> findAll() { return contaReceberRepository.findAll(); }…
-
-1
votes1
answer62
viewsHTTP Status 404 - Not Found - with Spring, Hibernate, Jpa, Mysql eTomcat
I made a change in my project passing the responsibility to Spring to control the transactions according to Caelum documentation and other examples I searched the web, already searched for…
-
-1
votes1
answer220
viewsError in Spring JPQL call:
Initially I am trying to make a call GET of a Book passing with the parameter the title attribute of the Book, later I intend to make a query of a Book by passing as parameter the title and the…
-
-1
votes1
answer61
viewsSpring Boot Map Static Files (React)
My question is, how do I map static files, for example in Nodejs using Express, I can: app.get('*', (req, res) => { res.sendFile(path.resolve(__dirname, '../build', 'index.html')); }); So all…
-
-1
votes1
answer259
viewsThymeleaf vs Angular
My searches say that Thymeleaf is a template engine that renders on the server, while Angular would be a front end framework, which renders on the client. I ask you. 1 - My search is correct, you…
-
-1
votes1
answer59
viewsMy Spring Data Hibernate project does not create the tables in SQL Server
I am studying Spring Data with Hibernate and I am using the SQL server database. I set up the project, with the dependencies in the pom file. The project is complicated without errors, but does not…
-
-1
votes1
answer43
viewsAre the Spring Data and Spring Data JPA modules frameworks?
I believe that every beginner has difficulties understanding the concept of a framework. I’m starting to study the Spring framework, within it there are several projects or modules, and within these…
-
-1
votes1
answer120
viewsHow do I leave my Hibernate (Spring Boot) dynamic query?
Hello I am trying to let my dynamic query down as follows: @Query("SELECT T.NR_EVENT FROM TB_TIMELINE AS T WHERE T.NR_PENUMPER = :customerCode") public List<TB_TIMELINE>…
-
-1
votes2
answers1348
viewsCannot resolve Reference to bean 'jpaMappingContext' while Setting bean Property 'mappingContext'
Is triggering this error when initializing the project. The Database already exists with its populated tables. Bank: Sqlserver . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ |…
-
-1
votes1
answer56
viewsHow to fix 1892 Spring startup error?
When I start my project in Spring Boot it appears to me this error: More information about the error: 2021-02-10 19:41:35.984 INFO 1892 --- [ restartedMain] com.produtos.apirest.ApirestApplication :…
-
-1
votes1
answer46
viewsHow to make a Onetoone in JPA with composite primary key?
How to put a User inside Serveruser? I tried it like this. It creates the database, but it keeps throwing me an exception And also he is creating a new user_idd field, would like to use the user_id…
-
-1
votes1
answer40
viewsMultiplication of Values
I have a product sales system In this system the user selects the product in a Combobox, after selecting the product the field Unit Value (Textfield) is filled automatically with the value that was…
-
-1
votes1
answer1390
viewsHow to upload multiple images using spring boot
I am developing a Mangas project and want to save several photos in the database. Paginascontroller @RequestMapping(value="/pagina", method = RequestMethod.POST) public @ResponseBody…
-
-1
votes1
answer84
viewsWildfly server memory error
I tried to import a 66 megas file, and gave this error in wildfly : Caused by: java.lang.Outofmemoryerror: Java heap space In addition to including this setting in spring. @Bean public…
-
-1
votes1
answer118
viewsHow to show the project version on the JSP page of a Spring MVC Web application
In the Java Web project with Spring MVC framework has the file pom.xml and within this file has several properties, among these properties has the version of the project:…
-
-1
votes1
answer67
viewsProblems with POM
I’m taking a spring course but I’m having a problem with the pom.xml file this is the description of the problem This is the source code <?xml version="1.0" encoding="UTF-8"?> <project…
-
-1
votes1
answer20
viewsclient resttemplate passes object with data collection, however api Rest only receives the main object
I have a class with a list of another object, but the api only takes the main object @Entity public class Vendacabecalho implements Serializable { private static final long serialVersionUID = 1L;…
-
-1
votes1
answer171
viewsHow do I make the endpoints of an API, made with Spring Boot, visible only to the application pages?
I have an application where the back-end was done in Java with Spring Boot, and the front was done in Angular. I deploy the Angular project built into the folder src/main/Resources/Static. In the…
angular spring spring-boot spring-mvc angular-routesasked 5 years, 4 months ago Gerson Ferreira Junior 59