This is my first time working with HATEOAS everyone and I have come to a screeching halt. Here is my problem, I have an app that converts text from a text area to a pdf and a pdf to images. My issue is that I send both back as a ResponseEntity<byte[]>. Here is a sample success response from the text
Tag: spring-boot
Get values from User and update into mysql database in Springboot Controller
I’m developing a Banking system Project Where User Should be able to create an account in any available branch. Branch Creation will be maintained by admin. I had two tables(Entities) like BranchDetails and AccountDetails. The BranchId Column is the primary key in BranchDetails and Foreign key in Accoun…
How to insert all enums into database?
We have a list of ENUMS for different purposes. Sample Enum: we use .sql file to save this enums, Problem: We need to write values two times (One in enum and another one .sql statement) It seems not efficient way, Is any other way to save ENUMS to avoid this repetition? Answer From the above mentioned details…
How can I get api with FeignClient
I used Lombok, Open Feign and Spring Web I have currencyClient interface: And Controller: And “http://localhost:1212/getAllCurrency” is not working cause the link is converted into “**https://openexchangerates.org/api/historical/2012-07-10.json/appId**” I understand that &/= are re…
Query on distant/not directly related entity
I’m trying to create a query with a where clause on a not directly related table. My table/entity structure looks like this: I have got an entity Entity with a ManyToOne relation to Relation. Relation has a ManyToMany relation to DistantRelation. I have a JpaSpecificationExecutor<Entity> on which …
how to configure spring security for spring boot project
I’m trying to make a web application that uses: SpringBoot, Mysql, JDBC , MVC, DAO Thymeleaf, IntelliJ And I’m trying to figure out how Spring security works (which I’m having a lot of difficulty with). My views are organized as follows: I would like to do that unidentified users can access …
Java Exception: Unauthorized: 401
I’m getting the error: Exception: org.springframework.web.client.HttpClientErrorException$Unauthorized: 401, when trying to connect to Jira through HttpHeader, and the credentials are configured in a configserver file, which would be this: And the method where I command to call the file above and where …
Custom Exceptions for JWT authentication don’t work JAVa
I implemented in my API Rest JWT authentication, but the exceptions that I created don’t work. This is what I expect: This is what I get: This is my CustomException Class This is what I have in my globalExceptionHandler And finally this is what I have in the method validateToken in JwtTokenProvider: pub…
Validator Framework @Min, @Max, @NotBlank not working
I am trying my hand in Validator ANnotations and I dont seem to have the hang of it yet THese are my DTO THis is my controller This is my request body I am able to get a valid answer for this, it doesnt raise an error or send my error messages. I dont understand why??? Someone help please Answer
.antMatchers(“/swagger-ui/**”).permitAll() error 405
I am impemeting swagger 3 in my APIREST but wne I try to access to this link http://localhost:8080/swagger-ui/, a 405 error shows up. This is the code in my ConfigClass: And this is the dependency in the POM.XML: Can someboyde help me, please? Answer You might be doing a PUT call for GET operation Please chec…