Skip to content
Advertisement

Tag: spring-boot

Error creating bean with name ‘userController’ defined in file

i got Error creating bean with name ‘userController’ defined in file. Unfortunately, i’m new in Java and Spring at all so can’t understand how to fix all of this. In my class “UserController” class constructor and method is never used (actually i don’t know why too). I started my DB PostgreSQL and tried to start my stpringBootproject, but failed. If

Spring Boot JPA unknown column in field list

In MySQL I have script that create table In java class i have model to this table In Repository package In client site i try send in request login and password but i have error in server site ‘ That mean I should change my column name in MySQL table to account_id? Answer “That means I should change my column

java.lang.IllegalArgumentException referenced from a method is not visible from class loader

I obtained an exception when generated a stub for a WS service by wsimport in /target/class/….. and run a spring boot application with devtools. Caused by: java.lang.IllegalArgumentException: com….Service referenced from a method is not visible from class loader I found that an issue with spring devtools class loader, RestartClassLoader, because of two different references to a Class (RestartClassLoader and AppClassLoader)

Parameter 0 of constructor in ….. Spring Boot

I have a problem when launch my app. Could somebody help me to solve this issue? GenericRepository GenericRepositoryImpl BookRepositorySearch BookService BookServiceImpl Answer From your previous comments, looks like you want to keep BookRepositorySearch as an interface. If that’s the case, you need to create a concrete instance of that interface and put @Component on that. You don’t need @Component on

Spring boot read array from YAML (properties) file

This is my project structure and i have this in application.yml in my Endpoint i have the following in any function i can access something like System.out.println(hello) and its perfectly working but for the fileTypes its not even compiling and i receive this error : Error creating bean with name ‘configurationEndPoint’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException:

Is Spring Framework used in a unit test?

I am getting ready to take my Spring Certification v5.0 and there appears to be a question: Do you use Spring in a unit test? Link to Exam Guide questions. From Spring reference guide I know this: The POJOs that make up your application should be testable in JUnit or TestNG tests, with objects simply instantiated using the new operator,

Spring unit test issue with Validator

I am trying to write unit test for a validator class that I have. So within my UniqueEmailValidator class, I injected a @Service component to check if it exist. And I tried to write unit test for this constraint validator. How do I initialize the AccountService within the Validator class? It seem like it wasn’t injected, hence, the null exception.

Advertisement