bobbibao / Mini_Project_VTI

Project for praticing java spring and Jira software with role trainee dev in VTI academy - JIRA + API
0 stars 0 forks source link

Parameter 0 of constructor in com.vti.services.implement.GroupService required a bean of type 'com.vti.repositories.IGroupRepository' that could not be found. #3

Open bobbibao opened 1 week ago

bobbibao commented 1 week ago

APPLICATION FAILED TO START


Description:

Parameter 0 of constructor in com.vti.services.implement.GroupService required a bean of type 'com.vti.repositories.IGroupRepository' that could not be found.

Action:

Consider defining a bean of type 'com.vti.repositories.IGroupRepository' in your configuration.

bobbibao commented 1 week ago

Because the applicaiton cant found components, models or repositories so you have to add configuration for software can scan:

@SpringBootApplication
@EntityScan("com.vti.models")
@EnableJpaRepositories("com.vti.repositories")
@ComponentScan({"com.vti.controllers", "com.vti.services.implement"})
public class MiniProjectVtiApplication {

    public static void main(String[] args) {
        SpringApplication.run(MiniProjectVtiApplication.class, args);
    }

}