Skip to content
Advertisement

user detail service cannot be cast to user in a unnamed module loader app

I don’t know what I did wrong. I was trying to implement the Jwt token(only post method).it shows the exception that Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.ClassCastException: class com.vivek.discussion.service.UserDetailServiceImpl$1 cannot be cast to class com.vivek.discussion.model.User (com.vivek.discussion.service.UserDetailServiceImpl$1 and com.vivek.discussion.model.User are in unnamed module of loader ‘app’)] with root cause

How to search in arrayList then change?

So i’m making a supermarket program that allows to add products and sell them, so far i have this: I´d like to know how to search in Product list by name and then change the stock(subtract-n) to sell n of that product. Answer You can use Stream API to find out the product by name. Filter the list by checking

Factory design patter Spring Boot double bean

Calling method executeSPV from abstract class If I remove @Componet from Upload and Download classes I receive error I need to add Bean for abstrcat class CommndBase If I use @Compoment on Upload and Download classes I receive dual Bean is useed… Field command in .Controller required a single bean, but 2 were found: Answer You should not use @Component

noHandlerFound in Spring for CSS

I am learning Spring MVC and I try to get some experience. I wrote an app and deployed it to Tomcat serve. At run time, the browser gets a 404 code for the CSS and Tomcat “WARNING [http-nio-8080-…

Non-resolvable parent POM for xxx

I’m trying to package a maven project and the IDEA console says “Non-resolvable parent POM for xxx”. The parent pom has been put in my maven local repository but can not be resolved by the submodules. The submodule’s pom.xml reports errors like this. The parent pom.xml looks like this The project seems like downloading the parent pom from the central

Advertisement