In my project, in the repository, this select finds the nearest date with a currency id that is less than or equal to the date whose range I set. How can I find a date in each month that is greater than or equal to the date I want to bind, but with the condition that this date must be
Tag: spring-boot
How to check the user’s verification code?
I am very new to Spring Boot. This is what I want to do: The user’s email is test@example.com. That user already exists in my database, but I would like to know if their verificationCode is 123. Entity: So with userRepository.findByEmail(“test@example.com”) I am getting the correct user, but…
How to create an endpoint which takes a path, load the image and serve it to the client
I want to serve an image to a client by converting it to a byte but for some reason byteArrayOutputStream.toByteArray() is empty. I get a response status of 200 which means it is served. I looked at various documentations on reading an image file from a directory using BufferedImage and then converting Buffer…
Can’t create one_to_one relationship: Unknown mappedBy in
I try to create an OneToOne relationship between two tables but I receive errors. I used a lot of tutorials but nothing helps. For example baeldung tutorial: Project structure: The error: Gradle: application.properties: Answer You need to use a field name for mappedby, not a column name. In you case, it shoul…
Spring Boot Unit Test returns 404 instead of 200
I am new in springboot. I am just watching the Spring in Action and programming follow the author. then things get difficult when i just reading the chapter 1. I need to test a controller. the code in this book is: I am using springboot 2.7.3 so i just remove @RunWith(SpringRunner.class) from my code. and i i…
Mapping multiple DTO to entities – nested exception
I’m trying to map DTOs to entities. I created a service that only takes care of mapping objects – ObjectMapper. DTO objects have relationships with each other. When I map a single object, for example when I create User, Group, Note, everything works. But when I want to use a method that returns a …
Sending an email at a specific time using spring boot [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 months ago. Improve this question in the application I am developing I can specify an expiration date of a …
calling a Redis function(loaded Lua script) using Lettuce library
I am using Java, Spring-Boot, Redis 7.0.4, and lettuce 6.2.0.RELEASE. I wrote a Lua script as below: Then I registered it as a function in my Redis using the below command: Now I can easily call my function using Redis-cli as below: And it will get executed successfully!! Now I want to call my function using …
POST/PUT/DELETE doesn’t shown in swagger springboot
it’s my swagger Config file Student Controller StudentDTO class My Repository Myapplication class application.properties pom.xml When I run this application everything looks fine but I can’t see the POST/PUT/or DELETE. I try to many things I find from Internet but it doesn’t work. I new on t…
Spring Boot, Spring-Security – BcrypPasswordEncoder in new component-based security configuration
I am trying to use the new Component-Based (Without WebSecurityConfigurerAdapter) configuration and setted up my Security Configuration as follow: SecurityConfiguration.java file but when I run the application and try to log a user the following error appears even though I have the BCryptPasswordEncoder as a …