Most voted "spring-boot" questions
Spring Boot lets you create production-ready Spring apps with minimal setup. Spring Boot favors convention on configuration and is designed to have an application running as fast as possible.
Learn more…642 questions
Sort by count of
-
1
votes1
answer687
viewsHow do you turn a Spring Boot project into a . jar file?
Guys I don’t know how to turn a Spring Boot project into a file. jar My attempt was to enter the project through msdos and with the command mvn install can create the file . jar However several…
-
1
votes1
answer690
views@Autowired does not work with my service
I always run the method that accesses what is in another class with @Autowired it is null, follow the code below: @Component public class TokenAuthenticationService { @Autowired…
-
1
votes1
answer39
viewsGet the content size returned in the request
Hello, I’m using an Interceptor that will intercept before and after the request. The goal of this is to get the size of the content sent and returned, however, I do not know a way to get the…
-
1
votes0
answers83
viewsIs there a restriction to consult using inheritance in Hibernate?
Good morning/afternoon/evening Gentlemen. The situation is as follows. I have a query that performs the registration of daughter entities aiming to divide the object. However at a future time the…
-
1
votes2
answers1009
viewsSpecification with Spring Data Jpa passing null parameter
I’m using the Specifications Spring Data JPA, but I’m having a hard time! By not passing any parameter in the two fields I want it to return all records to me. But when making the query it is…
-
1
votes1
answer1270
viewsProblems configuring CORS Spring Boot permitted origin!
That’s the error message you’re giving; I’m having trouble getting my Front-End API to access my Back-End API which is a Spring Boot project, I’m sure my problem is not my Fron-End API, the problem…
-
1
votes1
answer592
viewsspring boot modules via Maven do not interact
I’m using Spring Boot to create a Restful web service and a SOAP, each in a module but both in a single project. So I decided to separate my domain layer into a third module since it’s the same for…
-
1
votes1
answer79
viewsDifficulty Working with Thread in Spring Boot
See how my controller is @PostMapping("/anexo") public DeferredResult<String> uploadAnexo(@RequestParam("files[]") MultipartFile[] files){ DeferredResult<String> resultado = new…
-
1
votes1
answer1794
viewsSpring Framework Error: Unable to locate or load main class
I’m following some lessons from a Spring workshop, but I can’t go on because of the mistake: Unable to locate or load main class. Below is the code containing the main function: package…
-
1
votes0
answers122
viewsHow to use spring security isEnabled
I was wondering if I am using the isEnabled spring security method correctly. Because on my system, every user has a list of profiles. If admin removes all their profiles and the user tries to log…
-
1
votes1
answer167
viewsJPQL Not recognizing the parameter
I need to perform a query using JPQL or Spring-data keyword method. The problem is that the parameter inserted in the query is being ignored, I still could not identify the cause of it. Since the…
-
1
votes1
answer597
viewsSpringboot - JPA - does not migrate relationships in the entity and relationship diagram
I am creating a Rest application using Springboot, JPA and as a Mysql database. It works well, but it has something strange when I enter the database. I used Workbench to create the relational…
-
1
votes0
answers1168
viewsProblem with Spring Tools Suite
I am starting my studies with Spring and downloaded the Spring Tool Suite version 3.9.4. to develop java web applications. I had previously installed JDK version 8. I am using Ubuntu 18.04. Given…
-
1
votes1
answer265
viewsUser authentication with H2 database in Kotlin Spring Boot Application
Problem: Authenticate user using H2 database in Spring Security Context: The application is made using Spring, the user class is this @Entity data class Usuario( @NotEmpty var nome:String = "",…
-
1
votes1
answer153
viewsError doing Many to Many interface with Spring Boot
I’m trying to make a phone call Many-to-Many between classes usuario and permissao, using the documentation of Hibernate as reference . But when I try to generate a class JSON file usuario the…
-
1
votes1
answer157
viewsCapturing "radio" input data and transforming into JSON
(This project is being developed with Spring Boot + Thymeleaf) I have an html page that will work as a questionnaire containing about 100 questions (the code below is just an example). Each question…
-
1
votes2
answers364
viewsControl of Rest application transactions in spring
I was studying a little bit on the note @Transactional (version made by Spring), and I came up with a doubt. According to a published in Devmedia, to "more correct form" to use is to write down in…
-
1
votes1
answer272
viewsProblem with Feign Client
Good afternoon I have a small problem connecting to another API with the feign client, what happens that testing locally works, when I go to production that it simply gives a notfound. Code of Feign…
-
1
votes1
answer78
viewsDelete Oracle - Web Api
I’m trying to make this springboot code, become a code in Webapi @RequestMapping("/deletarEvento") public String deletarEvento(long codigo) { Evento evento = er.findByCodigo(codigo);…
-
1
votes0
answers139
viewsJson, Hibernate, Spring boot
I’m having two situations that should do the same thing but don’t: package com.example.demo.entity; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import…
-
1
votes1
answer403
viewsError while accessing route released with Spring boot
Good afternoon I am having a problem in releasing routes for my application made with Spring boot. The problem is that the "/home" main route asks for the JWT token to access it, but it is…
-
1
votes1
answer3765
viewsError while running default springboot project
I am trying to run the default springboot project that I acquired here. The project has the following dependencies: <groupId>br.com.fc</groupId> <artifactId>api</artifactId>…
-
1
votes0
answers38
viewsbad request when sending number to Spring controller
I have a form that sends some data to a controller, when I send only text data works, but when I send a given type number ( and that in the controller I hope to receive as parameter a Double) gives…
-
1
votes1
answer530
viewsPaging springBoot
I’m new to Spring and web development and I’m having problems paging a select, this is the method that makes the search: public static Page getAllPeople(Connection connection, Pageable pageable) {…
-
1
votes2
answers418
viewsSpring - @Autowire a List with elements
I have a controller that has this @Autowired: @Autowired Rules rules; This Rules class is defined as follows:: @Service public class Rules { @Autowired private List<RegistrationRule> allRules;…
-
1
votes1
answer82
viewsHow to control filters for a query that persists in mongodb
I have this query in my api: @Query("{$and: [" + "{'online': ?5}, " + "{'locations.appointmentTimeRanges.weekday': ?6}, " + "{'specialties.name': ?7}, " + "{'healthInsurances.name' : ?8}" + "]}") I…
-
1
votes0
answers354
viewsJava Spring Boot - Read file inside the . Jar
I’m doing a class that will read an ETL Pentaho Kettle (transformation), I put the file that the class will read in the Resources/KTR folder. But when I try to run the code as a java application…
-
1
votes1
answer227
viewsHow to create a business rule by JPA?
I need to implement a business rule that ensures that the same employee represented by the table Employee cannot be added more than once to the same project represented by the table Project. Let me…
-
1
votes2
answers947
viewsSpring Boot - Senseless 404 error
I’m starting with Spring boot and created a project by Spring Initializr with Spring Boot 2.0.5 and dependencies Web, PostgreSQL e DevTools, I imported the project in Intellij, until then everything…
-
1
votes2
answers682
viewsError while trying to connect to a Postgresql database with Hibernate and Spring Boot
I’m a beginner in Spring Boot and Hibernate, I did a project on Spring Initializr only with the dependencies Web, DevTools e PostgreSQL, but then I added dependency spring-boot-starter-data-jpa, I…
-
1
votes1
answer223
viewsSpring boot + Angular 6 + Heroku
I created a web application where the front uses angular 6 and the back uses spring boot. My goal at the moment is to put the application online. On the local server when I run the spring boot the…
-
1
votes1
answer48
viewsHow to use two date parameters for two Betweens without repeating the parameters using Spring Boots?
I’m starting with Spring Boot and I’m trying to use it for a query where I want to check if two date columns are between a period provided by parameters. The code below works, but for this I have to…
-
1
votes0
answers114
viewsError calling Java Fx screens in Spring
I am developing a Spring + Java Fx application, when calling the code from the main class screen, it works normally, but if I call another screen, it does not record the information in the model and…
-
1
votes1
answer127
viewsError: Thymeleaf is disabling the responsiveness of my Bootstrap form. How to resolve?
I’m creating a small web application to learn more about Spring Boot. I’m using the Thymeleaf as engine HTML and the Bootstrap as framework front-end. The problem is that I don’t know why, and I…
-
1
votes1
answer914
viewsHow can I get the JWT token after authenticating?
I have a spring-boot Rest API which, when a user authenticates the api returns the jwt token, I noticed in the browser that the token appears in Response Header > Authentication and in tests with…
-
1
votes0
answers122
viewsHeroku - Sharing databases across applications
I created a Python/Django app and published it in Heroku. (My database) Now I have a Java/Spring Boot API that is also in Heroku. (Rest API) But it connects in the base created by Django which is…
-
1
votes0
answers21
viewsExternal static methods not being recognized in the project
I am importing a library of utils into my main project, the library currently contains a single static method, I can import both manually and by Maven, but I am not able to access the static method…
-
1
votes1
answer36
viewsEntity attribute based on a field from another table - Hibernate
I have a microservice raised using Spring, Restful and Hibernate. I would like to know how I can modify an attribute of this json microservice, based on a condition, obtained through a query to the…
-
1
votes0
answers31
viewsLoad JWT Signature key from a dynamic base
I implemented an Authorization Server using AuthorizationServerConfigurerAdapter and users and customers are configured from the implementation of services UserDetailsService and…
-
1
votes1
answer51
viewsConsumption WS Rest returns null
I am consuming a WS to get data from vehicles, the API that I was passed returns a JSON: { "success": true, "message": "", "result": [ { "Codigo": "1013", "Placa": "ABC1234", "Ano": 2016, "Uf":…
-
1
votes3
answers4406
viewsError Full Authentication is required to access this Resource
Hello, I have a backend made with Spring and I Gero a file . jar and 'raise' it via Vscode to the front made in Angular. When I try to access my page (everything is localhost), I get this return:…
-
1
votes1
answer923
viewsHow to make a query by passing parameters with spring boot and redis using Jparepository?
I have the model: @Data @RedisHash("customer") public class Customer { @Id private String id; @NotNull private String firstName; ... I have the following interface: @EnableRedisRepositories public…
-
1
votes0
answers188
viewsCustom authentication page Spring security
I added the spring security dependency to my POM.XML, after which I created a new custom page for user authentication and configured webSecurityConfig to search my custom page, but when running the…
-
1
votes0
answers82
viewsIs there any problem in persisting an image in postgres and it is of type bytea?
I have an application that was using spring framework version 4 (application that generated a .War full of settings...), it worked plausibly. However, I decided to upgrade to version 5 (using spring…
-
1
votes1
answer408
viewsError passing a Thymeleaf object to the Spring Boot controller (post)
I have this controller: @PostMapping("/salvar") public String salvar(@Valid OrdemServico ordemServico, BindingResult result, RedirectAttributes attr) { if (result.hasErrors()){ return…
-
1
votes0
answers249
viewsExample Configuration in Swagger Secutiry with Spring Boot
I am making a documented API in Swagger, when I enter the url of my api, it appears to make an authentication, because it has a Websecurityconfig class that does this for me, but I wanted to make an…
-
1
votes2
answers874
viewsJava: create Inner Join using criteria
I’m having a hard time finding good examples of how to create a query criteria using Inner Join. I created the query below that would be what I would like to do with the criteria. SELECT DISTINCT *…
-
1
votes1
answer514
viewsHow to use Spring Data Binding Object for Snake case attributes while maintaining the Java Naming Conventions standard?
Hello, is there any way to perform Binding date of objects in Spring using Snake case? For example, suppose the following request GET on a job REST: http://localhost:8080/Foobar? foo_bar=example For…
-
1
votes1
answer93
viewsCORS blocks the requests
Hello, I’m developing a web application with Vue JS in a discipline and another person is making a Rest api with Spring, but when I run the api locally and try to access some of the resources…
-
1
votes2
answers3560
viewsHow to fix the error: cannot deserialize from Object value (no delegate- or Property-based Creator) using Spring Boot?
I am trying to send a JSON to my Spring method for entry into the database but I get the following message: JSON parse error: Cannot construct instance of br.com.marketHubServer.model.Collaborator…