I am trying to update several records from spring jdbc but this is not working what am i doing wrong? does not respond when I make a request, but the data in the array is arriving, try without array and the same thing happens. I am sending an array of objects to be able to update but I get to
Tag: spring-boot
HTML to PDF with cyrillic characters
I’m making a Spring Boot application. I want to generate PDF from HTML code: As you can see there is a h3 tag with cyrillic symbols. The problem is that after conversion and saving the symbols are not presented in PDF (it’s simply empty, because there is nothing more in html code to be visible). O…
Tomcat and Tomcat dbcp issue after upgrade to v9.0.58
I’m getting this issue when upgrading Tomcat and Tomcat DBCP from v9.0.54 to v.9.0.58 with Java 11. Answer This issue was happening when we were trying to create a BasicDataSource BasicDataSource dataSource = new BasicDataSource(); which was imported from import org.apache.tomcat.dbcp.dbcp2.BasicDataSou…
Accidentally deleted my test folder in Spring boot application
As the title says I accidentally deleted my test folder in Spring boot application and created a folder named test under src folder. But now I can’t create java class in test folder.IDE does not recognize it as a java class. What can I do to fix this? Answer Create the java in the test directory. If you…
Spring Controller GET/POST/PUT to another interface
I am using React as frontend and Java Spring Boot as backend. React sends JSON form data as GET/PUT/POST requests to my backend url (http://localhost:8080/test). Now, I wan’t to send this JSON forward to another interfaces GET endpoint (https://another/interface/add?id={id}). This interface then queries…
Spring Boot and OAuth2 server
I’m trying to implement a simple OAuth2 server with Spring Boot. In the first step I added in the main class the annotation @EnableAuthorizationServer and I use the “application.yml” file to configure all the OAuth2 elements. With this configuration everything works fine. In the second step …
Custom Data Binding in Spring
I have a situation here. Suppose, I’m receiving this JSON in the @RequestBody, Which I’m binding to a POJO, like so. Now, ResourceRefRequest, is as follows, and, RefReqItem, is as follows, Things are pretty well, as I expect them to be. The only problem is, refReqItem.resourceId is null, for all r…
Global jackson ObjectMapper not registering custom serializer
I am using Java 17, spring-boot 2.6.3 with spring-webflux and spring-consul dependencies and I have the following class: Here’s my custom serializer. And my models are as simples as this: I can’t annotate my model class with @JsonSerialize(using = ModelSerializer.class) because it is in a dependen…
Spring Boot multiple slashes in path variable
I’m trying to do but I want it to match: and so on I tried regular expression matching but came up with nothing. What would be the best way to do this? Answer you can try like this if key is a static if key is a dynamic
int io.jsonwebtoken.SignatureAlgorithm.getMinKeyLength()’ no such method error while generating a token key for authentication
Hello all I am trying to use JJWT to generate a security token for authenticating users. But getting this error. Here is my pom.xml file: Here is my method to generate a token if needed How to solve this problem? I tryed before to changed version of jjwt to 0.11.2 but got a build eror it couldn’t find a…