Category "spring-boot"

Validate Jwt signature

I have an app with React in the frontend and SpringBoot in the backend for the API, when I login with some user it saves the token in localStorage and you can m

Failing to connect to an Amazon Aurora MySQL from SpringBoot

I want to connect my spring boot application to AWS Aurora MySQL RDS. The problem is while there are plenty of examples of AWS MySQL RDS. I cant find an example

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed

I have a spring boot project running on java8 after I installed mysql8 server and tried to connect I am getting the error com.mysql.jdbc.exceptions.jdbc4.MySQ

How to write List<Number> with OpenCSV?

I have the following field inside a StacItem Object: @JsonProperty private List<Number> bbox = null; I made a basic implementation with OpenCSV to write

Getting a 400 bad request response when submitting a form in Thymeleaf to my spring boot application

I am creating a Spring boot application with a thymeleaf front-end. I am trying to create an object of type "expense" (seen in the code snippet below) but, when

@MockBean not fluent with testNG

With JUnit i could use @MockBean easily : @SpringBootTest(classes = AppConfig.class) @RunWith(SpringRunner.class) public @Log class ServiceDrhImplT

how to prevent jdbc from trying to connect to a mysql database during unit testing

I'm making an application for a school project, but I'm running into the issue that when I try to run the unit tests that it tries to connect to the database wh

How to call repository method in entity listener

I'm trying to make call to repository inside my Entity Listener, when I call repository.findById() method inside my @prePersist method the same method is callin

solr exception Expected mime type application/octet-stream but got text/html

Hi I am trying to index an entity in solr using spring boot data solr. But i am getting exception Caused by: org.apache.solr.client.solrj.impl.HttpSolrCli

Spring Boot build image failure for native image

Using spring boot 2.6.2, with java17, trying to create native image but it fails with below error. I am building it on windows 11 machine with docker desktop i

Spring Boot Kotlin Mockito @MockBean dependency throws IllegalStateException null on method call

I am relatively new to Spring and Kotlin. I ran into this problem and it does not seem that there is a comprehensible (for me) explanation anywhere on the Inter

java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts - maven spring-boot

java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts When I run locally with mvn spring-boot:run , there's no problem. But when I package my application into

How to protect reactjs resources with spring boot based authentiation?

My current project state: I am working on a Web Application with ReactJs (frontend) and spring boot (backend). When I deploy this application, I package react

How to protect reactjs resources with spring boot based authentiation?

My current project state: I am working on a Web Application with ReactJs (frontend) and spring boot (backend). When I deploy this application, I package react

Performance insert by JPA Spring-boot with Oracle database

the first thanks for your time. I am trying to insert data to the database by JPA(spring-boot), the project is using Oracle. Currently, Insert 5000 record, it t

ByteArrayResource usage

I have a template pdf which is stored in either in physical path or in application classpath. I have to read this template and fill its fields for each request

Northwind - creating orders (MySQL + Spring boot)

I have DB with schema like below: I would like to create an Order. I created DAO of Order with all columns like below and added there relations like this: O

Is it possible to access a property value from another maven project?

I have a SpringBoot service: package test; @Service public class TestService { @Value("${service.readTimeout}") private Duration readTimeout; } service

Spring post method "Required request body is missing"

@PostMapping(path="/login") public ResponseEntity<User> loginUser(@RequestBody Map<String, String> userData) throws Exception { return ResponseE

CSS and JS file not loading while deploying war file on apache tomcat

was using the spring-boot-starter-web-mvc for initial development.When I deploy the war file on the server it is not loading css and js files, but when I run th