Skip to content
Advertisement

Tag: spring-boot

react + spring boot upload file and form data

i have a case like in my form (front end), i can fill personal data (name, address, DOB) and then i can attach multiple image. In my spring boot controller : My model wrapper : Front end (React) Code : With above example, i always encounter errors. like : java.io.IOException: Stream closed and zero attachment length / zero attachment size

Using Spring data JPA EntityGraph with LAZY load mode for NamedAttributeNode field

I am facing with 2 problems: N + 1 query and Out Of Memory (OOM). I solved OOM by paging and lazy loading: But when I use lazy loading, N + 1 query happened. So I try to use EntityGraph as https://www.baeldung.com/spring-data-jpa-named-entity-graphs. But as my researches and local test, EntityGraph always do eager loading for NamedAttributeNode field – association field,

Spring Boot REST API using LDAP authentication

So I’m trying to build a REST API that will use LDAP authentication. Basically, when my login endpoint is consumed, I want it to detect credentials using httpBasic authentication and then use those credentials against my LDAP server. I also want to take into account user roles, protecting endpoints so that only certain users with the proper roles can access

Deploying spring boot application to heroku – error message “No web processes running”

I created a spring boot web application (in IntelliJ IDEA), which runs locally without problems. I then built an artifact (Build -> Build Artifacts… -> my_app:jar -> Build), which created a jar file in directory “out”. I tried to deploy the app to heroku following exactly the steps described in this walkthrough by heroku: https://devcenter.heroku.com/articles/deploying-spring-boot-apps-to-heroku Note: the walkthrough does not

Why has javax.persistence-api been replaced by jakarta.persistence-api in spring data jpa starter?

I’ve recently started to learn spring boot, data jpa. As I can see from this, the spring boot data jpa starter uses jakarta.persistence-api instead of javax.persistence-api: What is the differences between jakarta.persistence-api and javax.persistence-api? What is the reason of this replacement? Answer From Java Persistence API on Wikipedia: The Java Persistence API (JPA), in 2019 renamed to Jakarta Persistence, is

Swagger Codegen basePath is being ignored

I’m trying to generate some web services definitions using Swagger Codegen ยป 2.2.1 All configs are working and the classes are generate correctly by my .yaml definitions. Why the property basePath is being ignored? My @RestController generate using only paths definition: Expected (using basePath and paths definitions): What am I doing wrong? Did I forget something? My .yaml contract: Answer

Advertisement