Questions tagged as 'spring-boot'

1
answer

Problem in scheduling for email notifications Spring and JavaMailSender

Good morning, I'm using spring with Scheduled, before using the quartz but as I uploaded the spring version I decided to abandon the quartz since the first option was enough to meet my need. In short, I have a task that sends emails, this...
asked by 02.01.2019 / 14:09
1
answer

How to set values in Enum?

Watch Grid TherecordthatiscomingfromthedatabaseisofanEnumclass,thecorrectonewasfortheresultinthegridtobeprintednamevalueandnotV.ThisisEnum;VALOR("V", "Valor"), PERCENTUAL("P", "Percentual"), DIA("D", "Dia"), HORA("H", "Hora");...
asked by 11.12.2018 / 15:02
2
answers

Difference between RequestMapping and PostMapping

I was looking at requests from Spring Boot and I saw that you can make a request POST , in two ways: //primeira forma @RequestMapping(value = "/dev", method = RequestMethod.POST) public ResponseEntity<String> dev(@Reques...
asked by 09.11.2018 / 19:42
1
answer

How to fix this and other errors: Failed to convert from type [java.lang.String] to type [java.lang.Long] for value 'list'?

I'm implementing an example of a book on Spring Boot , but after executing, when trying to access the /clientes/list or /clientes/view route in the browser the following errors appear:    Failed to convert value of type 'java.la...
asked by 14.10.2018 / 07:56
1
answer

Get value from an application.properties property - Spring Boot

I am a beginner in Spring Boot. I have a project in Spring Boot which has a application.properties and the inside has a property with a value ( spring.datasource.username=user ) and I want to get this value in a class java mine, I w...
asked by 04.10.2018 / 05:58
1
answer

How to do the unit test of Spring Boot insert the data in the Bank?

I created a simple system that is working perfectly, but I need to implement a unit test in Spring Boot, which happens when I test or I can not enter the data in the database or it generates error; I tried this way, did not generate error, bu...
asked by 19.09.2018 / 14:32
1
answer

PDF empty when downloading using Spring Boot and AngularJS

I'm creating an application where I need to return a PDF via an API call developed in Spring Boot through AngularJS, my code looks like the one below: API Return: ResponseEntity.ok() .headers(result.getHttpHeaders()) .body(n...
asked by 16.07.2018 / 22:09
1
answer

SpringBoot with hibernate and relationship between postgres tables in different schemas

I have the following problem: I created a database named Test and it has two schemas: schema1 and schema2. Within each schema has a table: schema1 - > table1 schema2 - > table2 It turns out that if I try to make a relationship with Spri...
asked by 20.07.2018 / 20:06
1
answer

Spring Data JPA - Query via Specification - ManyToMany and Join with Multiple Entities

Hello, I've assembled the following class Specification: public class ItemVendedorSpecification implements Specification<ItemVendedor> { private static final long serialVersionUID = 1L; @Autowired CategoriaRepository catego...
asked by 22.05.2018 / 16:01
1
answer

How to run a RestFull project on the TomCat server?

I created a simple project, and managed to run it in SpringTools, can also run it on the Heroku server and now I'm trying to run it on the TomCat server on my local computer. I put tomcat to run, and I packed the project with the command;...
asked by 13.04.2018 / 17:02