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
-
0
votes1
answer146
viewsError while performing Basic Auth authentication in REST API on android
I’m having a hard time integrating with an API using basic auth authentication. I created a Java API using spring boot and spring security. When I use Postman the request works without any problem,…
-
0
votes1
answer104
views(JAVA) How to treat Exception with spring?
In my model I declared this code to be unique. @Column(unique=true, name = "codigo") private long codigo; At the time it is displayed in the api and I inform equal codes for two employees appears to…
-
0
votes1
answer323
viewsHow to Update Only Some Put Fields in Springboot
Hello People Explaining speed the code this endpoint there is my route updating an already registered student I enter with the data I want to register and send to update function and la "Arrow" data…
-
0
votes1
answer26
viewsError while deploying appengine
I have this project in spring, runs locally with appengine, but when I deploy, it error it in appengine org.eclipse.jetty.annotations.ServletContainerInitializersStarter doStart:…
-
0
votes1
answer742
viewsNo Qualifying bean of type found for service
Good evening guys, I’m trying to launch a Spring API and I’m having the following problem running it, I’ve tried renaming the methods as well as the functions First I’ll leave the Debug log here…
-
0
votes1
answer197
viewsJPA connection to Firebird error
I always used mysql for the database, but now I have a need to connect with a band Firebird(FDB) in a project, I am using Maven, when trying to connect spring returns me the following error: Caused…
-
0
votes0
answers84
viewsError making a POST request with Springboot
I have the code below: String url = new StringBuilder().append("https://...").toString(); Map<String, Map<String, String>> body = buildBotBody(email,message);…
-
0
votes1
answer230
viewsSpring Boot - initial test data
I am trying to pass data to test the front, but the controller is not getting the data that Spring Boot should start. My application.properties: spring.jpa.hibernate.ddl-auto=create My import.sql:…
-
0
votes0
answers295
viewsProcess finished with Exit code 0
Hello, I am creating an application with Spring Boot Applicatio followed this tutorial: https://medium.com/@omeryazir/create-a-spring-boot-application-postgresql-spring-security-499488c30beb I…
-
0
votes1
answer2231
viewsHow to do Inner Join in Jpa Springboot
I have the following appointment: select m.id, m.nome, m.crm, e.descricao especialidade from medico m inner join especialidade e on e.id = m.especialidade_id Whose database return is like this: '5',…
-
0
votes0
answers52
viewsI’m trying to make a POST request, but Postman is returning an error. Help me!
Controller: package Controlador; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping;…
-
0
votes1
answer199
viewsInsert data into related entity @Onetoone in Spring Boot(Jpa, Hibernate, Postgre)
I have a one-dimensional relationship (1:1) where the contract has a tenant. Class User @Table(name="TB_USER") @Inheritance(strategy = InheritanceType.JOINED) public class User implements…
-
0
votes1
answer64
viewsProblem with Spring Boot Mapping
Hello, I have the following project structure using Spring Boot and I’m having problems es create their Beans: project1: com.portal (spring-boot service) contem os @Controllers project2:…
-
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
answers65
viewsHow to delete a record in the Mysql database using Sweetalert in Spring Boot Modelndview
I would be grateful if you could help me solve this problem that I am not managing to do. I wanted to delete a record in the Mysql Database using Sweetalert. What’s happening is that it doesn’t…
-
0
votes1
answer50
viewsError sending email using Javamailsender - Microsoft Exchange 10
Good morning! I cannot send the email. All the settings I tried to use return the same error: WARN o.s.w.s.m.a.ResponseStatusExceptionResolver - Resolved…
-
0
votes1
answer34
viewsLock problem on the base + Springboot
Good morning, I created a Spring Boot application and through the properties I enabled the file base to check if it is necessary to upgrade the database structure. The problem is that the first step…
-
0
votes0
answers19
viewsSubtraction of an Expression<sql. Timestamp> in the criteriaBuilder
I have the following implementation: private static Specification<Record> sinceMinusMinutes(Integer minutes) { return (Specification<Record>) (root, query, criteriaBuilder) ->…
-
0
votes0
answers120
viewsHow to include a file in a S3 with localstack using Java?
I created an application using Java with Spring. I set up a localstack and created a Bucket using AWS CLI. Everything went right. Only when I try to include a file using the code below, it bursts an…
-
0
votes0
answers15
viewsSpring boot with Mongodb (Class _Accessor)
I have an API that uses Spring-boot and makes a recording in Mongodb. I was doing some local tests and I found that it has a class with high object allocation but wanted to understand where this…
-
0
votes2
answers41
viewsKotlin+Springboot [Beginner] I can’t create Post method
I didn’t even want to go to Stack in such a simple problem, but it’s already dragging on for days and I managed to implement the GET method with a certain ease, I’m learning Kotlin and java, I’m not…
-
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
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
answers180
viewsSpringboot, Hibernate does not create tables in the H2 database
Hello I’m trying to use bank H2 with springboot, but tables are not being created in the database automatically. application properties #DataSource spring.datasource.url=jdbc:h2:file:~/fintech…
-
0
votes0
answers17
viewsSelect table item and generate Jasperreport
How do I generate a Jasperreport by clicking on an item in a table? My question more precisely is that when clicking on the table row the method would be get (requestMapping), then as from there how…
-
0
votes1
answer29
viewsMaking a Mistake in Creating a Bean
I created my API with TDD, but when I implemented a new method in my controller the tests stopped working. I created several tests that stopped working when I created loansByBook in Bookcontroller,…
-
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
answer27
viewsHow to do @Autowired on a List<Meucomponente>?
Good morning, I have a component that has injected services. This component is of the 'prototype' scope and is running infinitely. I need to run X components (passed via argument) of these and why I…
-
0
votes0
answers81
viewsSpring Boot Admin cannot fetch healt information from client
I made a simple library api but when my monitor tries to fetch her health reports return the following error: Error in client : Failed to register application as…
-
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
votes0
answers97
viewsREST Springboot API to generate random bet numbers
I am creating a REST API to generate random number for lottery. These are the requirement endpointes. In the first step, we need to build an endpoint that will receive the person’s email and return…
-
0
votes1
answer86
viewsError while compiling SPRING BOOT application
I am trying to compile a java application and is giving this error: restartedMain] j.LocalContainerEntityManagerFactoryBean : Failed to initialize JPA EntityManagerFactory: Unable to create…
-
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
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
answers58
viewsSpring Boot rollback in chain transactions
After validating all entities, I call a method to perform several operations in the bank, in which if one of them goes wrong, all the above must be undone. When arriving at the "throw new…
-
0
votes0
answers36
viewsDifficulty Creating a Session
i’m having a hard time creating a Java Session. I’m creating a registered api called. In short, I have the User Controllers and the Chamadoscontroller. In Callscontroller it needs to receive the id…
-
0
votes0
answers40
viewsException is being printed on the console instead of being sent to the client
public boolean validateToken(String token){ try { Jws<Claims> claims = Jwts.parser().setSigningKey(secretKey).parseClaimsJws(token); if (claims.getBody().getExpiration().before(new Date())) {…
-
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
answers13
viewsHow to set a postgres function parameter using Native query?
Good afternoon! I created a Native query that uses a postgres function date_part(text, timestamp). My code: String sql = "SELECT " + "(SELECT coalesce(count(*), 0) FROM public.cliente) AS…
-
0
votes0
answers10
viewsAjax problems with Firefox 86
I have an application using Spring Boot, Bootstrap and jQuery running in Firefox. In the combo there is an ajax call. During the GET request, the screen objects disappear and when the combo returns…
-
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
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
votes1
answer63
viewsIntermediate table mapping with JPA attributes
Hello, I’m trying to create a relationship where there is an intermediary table that has fields other than foreign keys. My classes are like this: @Entity public class Pedido { @Id…
-
0
votes1
answer333
viewsSpring Boot @Autowired does not work with Repository
I have the following mistake: Description: Field categoriaRepository in com.algaworks.algamoneyapi.resource.CategoriaResource required a bean named 'entityManagerFactory' that could not be found.…
-
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
votes0
answers77
viewsError: Could not find or load main class in module Pdvapplication
I can’t run the PDV application to test. I cloned the project from github to my folder and ran it using Maven in the Intellij IDE. Inside the Intellij the main is this below. It runs error-free on…
-
0
votes0
answers67
viewsWhitelabel Error Page - Java Spring Boot Project Error
Good afternoon, I’m new here, and I’m starting to study java, I’m trying to climb an initial application with spring boot, but I’m with the error Whitelabel Error Page, I tried to solve by some…
-
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…