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
-
3
votes1
answer378
viewsJPA Deletes database data each time it restarts
Every time I restart the service, the data is deleted from the database. Has anyone gone through this and can you help? I am using Spring boot with JPA, Hibernate, Mysql, WEB and Rest. One of my…
-
3
votes2
answers598
viewsError in @Onetomany mapping with JPA and Hibernate
At the moment, I’m having a problem with mapping @OneToMany/@ManyToOne in my application. I would like it when I persist my entity Sale automatically save the sale items in single shot. @Entity…
-
3
votes1
answer53
viewsUse of only one attribute of an entity
I’m building a Rest API for Cities and Customers registration. My problem would be in relation to the Customer class that has as attributes personal data of the customer and a City, that would be…
-
2
votes1
answer455
viewsMicroservices with Springboot
I started to develop an application using the concept of microservices and I still have a lot of doubts. I have repositories and their respective entities, requests submissions work correctly but…
-
2
votes1
answer5362
viewsWhat is the purpose of the @Transactional(readonly = false) annotation?
Annotation used for service injection in the Spring Framework.
-
2
votes1
answer2148
viewsSpring Boot configuration error: org.springframework.boot.autoconfigure.Orm.jpa.Jpabaseconfiguration.jpaVendorAdapter
Hello! I am getting the following Stacktrace below when I start Tomcat with my web project after making the settings with Spring Boot. After I created the following classes below, I’m having this…
-
2
votes1
answer863
viewsModel attribute unit tests in spring boot application
Good afternoon I don’t have much experience with unit testing. I’m testing controllers in a spring boot application, but I made some error in testing model attributes, which apparently isn’t even…
-
2
votes1
answer324
viewsHow to integrate spring batch+spring boot+Quartz
Good morning. Currently in my project I am using spring boot and spring batch. Creating the batch was easy, even running it when starting the application with Tomcat embebed from spring boot but…
-
2
votes1
answer311
viewsRepository - Record Filter according to user permission
Searching on how to filter records with Restpository, I found the annotations: @Preauthorize @Prefilter @Postfilter It has 2 roles in the system: ROLE_ADMIN and ROLE_USER and ROLE_ADMIN can access…
-
2
votes1
answer177
viewsHTTP - Correct return types
I have some questions regarding the most appropriate status for each situation to follow: PUT in Object without Id PUT in the URL localhost:8080/users/1 with a JSON without the attribute Id. PUT in…
-
2
votes4
answers1376
viewsApplication with Tomcat and Spring Boot
Hello! I am having following problem in my application. After running the main method just below and enter in the browser the address of my application localhost:9090/restaurantWeb is opening a…
-
2
votes1
answer105
viewsEntity Repository Spring Error with Relationships
I have a project using Spring Boot to serve JSON on a Webservice. An error occurred when adding the Repository class. If you remove it the program starts normally (no errors in the console, I don’t…
-
2
votes1
answer500
viewsCalculated Field JPA Spring Boot
I’d like help finding a calculated field. The problem is that it involves relationships. I need to calculate the total of a Sale with various Sales Items (products). Partial total per Item of Sale…
-
2
votes1
answer564
viewsAutowired spring boot in Jframe
In the development of a Spring Boot application for Desktop, it is possible to inject a @Repository in a class JFrame? If yes how? Some alternative? Code examples: @Repository public interface…
-
2
votes1
answer3603
viewsSpring Boot application does not rise - org.springframework.Beans.factory.Unsatisfieddependencyexception
I created the application from SPRING INITIALIZR. I made the adjustments for the first operation and configured the application.properties however I continue to receive the same exception:…
-
2
votes3
answers2409
viewsWhat is the best way to send my Spring Boot project to the server?
I’m building my first application Java Spring Boot. In this first experiment, I’m having trouble using Git and sending it to the server. The main idea would be: I pull into a private repository,…
-
2
votes1
answer141
viewsSpring instantiating object with @Value
In my application.properties has the algumaCoisa=joao, and when I spin the java -jar nomedo.jar, it comes null, someone can explain to me why this happens and how I arrange? @Component class…
-
2
votes1
answer590
viewsError starting spring boot application
I need help I’m trying to start the application on spring boot, dry the complete error org.thymeleaf.exceptions.TemplateInputException: Error resolving template "error", template might not exist or…
spring-bootasked 7 years, 1 month ago WeltonSistemas 75 -
2
votes0
answers483
viewsSpring Security Oauth2 in API Rest
Good morning. I have a Web Service Rest implemented and I am working on the security of it at the moment. This Web Service has been implemented using Spring Boot. Initially I will have as customers…
-
2
votes1
answer8231
viewsConnect Springboot with Postgresql
I’m trying to connect the bank with Springboot and I’m thinking my problem is here: # =============================== # = DATA SOURCE # =============================== # Set here configurations for…
-
2
votes1
answer375
viewsTwo id in table Hibernate
Is it possible for two fields to be id in a Hibernate table? I have two ids that need to be single in even table. But I don’t know how to implement.
-
2
votes2
answers2377
viewsWhat’s the difference in using Modelandview and Responseentity?
I came across these two classes, I found their function quite equal. What are the differences between them and when is the time to use a specific?
-
2
votes1
answer807
viewsHow to make a find with Pagination and search term at the same time with Spring data?
Hey, here’s my question. I want to do a search by passing a Pagerequest and an Object or some search terms and get a list back. For example: List getList(Pagerequest page,Person person person); In…
-
2
votes1
answer1612
viewsThymeleaf does not find Sources
I’m creating a project with Springboot and Thymeleaf. I set up the whole project, I find the template and the pages, so my template can’t find the files css and js; Html <link rel="stylesheet"…
-
2
votes1
answer1110
viewsHow do I return in json to Foreign key in Spring Boot?
As you can see it is returning to the cities without any problems in the following URL: http://localhost:8080/cidades, watch: This is a return coming straight from the database with a select * from…
-
2
votes2
answers2953
viewsMy application does not start in Spring-Tools Suite
I created a Maven project in Spring-Tools Suite when I started this error appears: Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of…
-
2
votes2
answers711
viewsUsing Maven or Spring Boot?
In my researches I could understand that there is how to perform application Profiling (e.g. homologation and production) in two ways, via Maven and spring-boot. The big question is that I have…
-
2
votes1
answer764
viewsHow to create a prefix for the url using spring boot
I learned to use the spring doing all the configuration in java classes and now I’m migrating to the spring boot 2.0.2. I would like to know how to create a prefix in the URL that has the name of…
-
2
votes1
answer1439
viewsRequest Post API Messenger with Spring Boot
I need to create a post method that returns this information to the Messenger API with Spring Boot, if anyone can give a light thank you. The example below is found in the Facebook Developers…
-
2
votes4
answers1921
viewsHibernate does not create table automatically in mysql
I’m studying Spring with a little hibernate, where I stopped in a situation I can’t pass. I configured the code with Hibernate for creating tables in the database but when I run the application it…
-
2
votes3
answers572
viewsHow to map an entity with a composite key using JPA?
@Entity @Table(name = "USUARIO") public class Usuario implements Serializable { @Id @GeneratedValue(strategy= GenerationType.AUTO) @Column(name = "ID") private Long id; @Column(name = "USER_NAME",…
-
2
votes0
answers158
viewsHow to return a MAP using JPA’s native Query?
I need to consult a bank that is already established, populated and maintained by another application. So I don’t have the entities in my project and I didn’t want to create. I am using Spring Boot…
-
2
votes1
answer117
viewsHow to configure log4j2.xml with different parameters per environment
How to use log4j2 with different parameters per environment in spring boot. I need the log to be generated with a different name for each environment.
-
2
votes0
answers249
viewsProblem connecting to database in Google Cloud and Spring Boot
I’m using Google Cloud Platform, but I’m having a hard time connecting to the Mysql database on the platform itself with Appengine. Just follow my pom: <?xml version="1.0" encoding="UTF-8"? />…
spring-bootasked 6 years, 4 months ago Daniel Elizeu 21 -
2
votes0
answers59
viewsSpring JPA - Procedure call with sqlserver dialect
Hello, I have the following configuration in my application file.properties: spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.dialect=…
-
2
votes1
answer384
viewsWhat happens internally when running a Spring Boot application?
Recently I have been studying Spring Boot, I wanted to know what happens internally when an application is started, because every project has a main class that is always noted with…
-
2
votes0
answers106
viewsLearning Problem with Springboot
Hello, I’m starting my study at Springboot, where I got to a part that I couldn’t solve on account of an Exception, where I’ve seen on various topics of how to solve, and none worked for me. I…
-
2
votes0
answers123
viewsHow to fix strange Docker bug?
In a few days ago I started my study with Docker, I took one of those courses from cod3r, seemed beautiful and wonderful. And then I started experimenting with Spring Boot, it’s an archive JAR that…
-
2
votes1
answer595
viewsQuestions Spring Boot Web App -> Android
A few weeks ago I finished the project of a web system that makes basic Ruds, I used Java, Maven, Spring Boot, Hibernate, Bootstrap + Thymeleaf pro frontend, etc... And I deployed to Heroku using…
-
2
votes1
answer194
viewsWhat are the differences between MVC and REST architectures using Spring?
I’m wondering which architecture to use MVC or REST.
-
2
votes1
answer275
viewsWhat is the point of using Assert.assertNotNull() in frameworks?
I have seen in the Spring Boot framework that they use a lot of Assert.assertNotNull() to validate the variables if they are receiving null values. It is correct to use this same approach in…
-
2
votes1
answer96
viewsResult of the GET method brings all database relations and subrelations
I have an application where I have a listing screen I’m doing a GET method on my Spring Boot API Controller class @RequestMapping(method = RequestMethod.GET, value = "/distritos", produces =…
-
2
votes0
answers839
viewsSpring Boot connectable in Microsoft Sql Server database
I’m trying to connect in Sql Server 2008 database, but this giving this error: com.microsoft.sqlserver.jdbc.Sqlserverexception: Connection to ERSERVER host failed, instance named sqlern_desenv.…
-
2
votes2
answers3090
viewsWorking with application.properties file
See my application.. properties file: spring.jpa.database=POSTGRESQL spring.datasource.platform=postgres spring.jpa.show-sql=true spring.jpa.hibernate.ddl-auto=create-drop…
-
2
votes0
answers140
viewsHow to create tables in Postgre with fields not null?
good morning gentlemen, I made my attempt to create my Postgre table this way: CREATE TABLE categoria ( codigo BIGSERIAL, nome VARCHAR(50) NOT NULL, PRIMARY KEY(codigo) ); Despite the countryside…
-
2
votes0
answers260
viewsCannot load driver class: org.sqlite.JDBC
I’m trying to set up an access from my application to an Sqlite database using the file application.properties Spring Boot, but not recognizing the driver. How can I proceed so that when booting…
-
2
votes2
answers12692
viewsError Creating bean with name 'entityManagerFactory' defined in class path Resource
Good night, I have an application using Spring boot 1.5.10. I’m trying to make the connection to the oracle database, but I always have this title error. Attempts: I went back to the spring boot…
-
2
votes1
answer552
viewsStore digital certificate on Server
I am creating an application that will work and manage digital certificate of customers. The idea is to import the customer’s certificate and I leave available subscription and transmission methods…
-
2
votes1
answer3188
viewsConfiguring Multiple Databases in Spring Boot
My application has a remote database connection (Sqlserver), but I would like to perform a small duplication of certain less volatile data in a local and embedded database (H2) to gain in…
-
2
votes1
answer39
viewsHow best to relate this entity
in my application I have a user entity that relates many to many with the entity courses (a user can enroll in many courses and a course can have multiple users) And the entity courses relates from…