Skip to content
Advertisement

I want to mapping MultipartFile with userId

I’m trying to upload excel file then save it to Product DB, I have User, Product Tables but product mapped by user Table. so I got error when I try to upload.

Since I need to check who upload the file. mapping is nessesary. I don’t know where should I put the code to map the userId.

Editted post ##

I added the ExcelEntity!

Advertisement

Answer

You should be able to use the below code in your controller to get UserDetails of the logged in user.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement