Questions tagged as 'spring-boot'

1
answer

Save Spring Boot request

I'm a beginner in Spring Boot and I need a little help. I want to save an incoming and outgoing request, generating the automatic id and saving the date and time, using docker and Postgres (I do not know if it changes either to say that I'm usin...
asked by 14.07.2018 / 18:07
0
answers

A help with annotations with Spring Boot

A help with annotations ... Today my tests are like this: @ConfigA @ConfigB @ConfigC @ConfigD public class MeuTesteA {} @ConfigA @ConfigB @ConfigC @ConfigD public class MeuTesteB {} See, I have to repeat many configuration annotations. To...
asked by 18.05.2018 / 21:45
0
answers

Can not load driver class: org.sqlite.JDBC

I'm trying to set up my app's access to a SQLite database using the application.properties of Spring Boot file, but it's not recognizing the driver. How can I proceed so that when initializing with Gradle the application recognizes the dr...
asked by 24.01.2018 / 01:27
0
answers

Spring Boot connecting to the Microsoft Sql Server database

I'm trying to connect to SQl Server 2008, but I'm giving this error:    com.microsoft.sqlserver.jdbc.SQLServerException: Failed to connect to host ERSERVER, named instance \ sqlern_desenv. Error: "java.net.SocketTimeoutException: Receive time...
asked by 25.10.2017 / 17:56
0
answers

How to create tables in Postgre with not null fields? [closed]

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) ); Although the name field is like not null it is...
asked by 15.11.2017 / 12:40
1
answer

Springboot does not render image (only restart)

I have an entity called product that has only Title, Price, and PathImage, which saves the path where the product image is saved. When I receive this form data, my service executes this code: public void addProduto(Produto produto, MultipartFi...
asked by 08.06.2018 / 19:07
1
answer

Difficulty in implementing password encryption with Spring Boot

By title you can realize that it is a Spring Boot project, and being a Spring Boot project many things are already configured by FrameWorks, but I do not know about the implementation of password encryption, in Spring MVC you have to configure s...
asked by 04.07.2017 / 14:56
1
answer

Result of the GET method brings all the relations and the subrelations of the bank

I have an application in which I have a list screen I'mdoingaGETmethodonmySpringBootAPIClasscontroller@RequestMapping(method=RequestMethod.GET,value="/distritos", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Coll...
asked by 05.10.2017 / 16:04
1
answer

Repository - Records Filter according to user's permission

Searching on how to filter the records with the repository, I found the annotations: @PreAuthorize @PreFilter @PostFilter You have 2 Roles in the system: ROLE_ADMIN and ROLE_USER where ROLE_ADMIN can access all records, ROLE_USER can...
asked by 06.04.2017 / 17:06
0
answers

How to return a MAP using nativeQuery from JPA?

I need to consult a bank that is already created, populated, and maintained by another application. So I do not have the entities in my project and I did not even want to create them. I'm using Spring Boot with JPA. Here is an example code:...
asked by 21.05.2017 / 22:26