Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我想用Spring Security创建身份验证!我有这个错误_Spring_Spring Boot - Fatal编程技术网

我想用Spring Security创建身份验证!我有这个错误

我想用Spring Security创建身份验证!我有这个错误,spring,spring-boot,Spring,Spring Boot,应用程序无法启动 说明: Field userService in com.rizomm.filemanager.server.controllers.AuthenticationController required a bean of type 'com.rizomm.filemanager.business.services.UserService' that could not be found. The injection point has the following annota

应用程序无法启动

说明:

Field userService in com.rizomm.filemanager.server.controllers.AuthenticationController required a bean of type 'com.rizomm.filemanager.business.services.UserService' that could not be found.

The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.rizomm.filemanager.business.services.UserService' in your configuration.

您是否用
@Component
注释了
com.rizomm.filemanager.business.services.UserService
类?没有,为什么?我用@Service
注释@Service
也可以。你能上主课吗?这可能是包扫描问题。@SpringBootApplication(scanBasePackages={“com.rizomm.filemanager”})@ComponentScan(value={“com.rizomm.filemanager”})公共类文件管理应用程序{public static void main(String[]args){SpringApplication.run(FilemanagerApplication.class,args);}