Skip to content

Tag: spring-boot

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 chang…

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 …

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 ‘confi…

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 instanti…

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…