当我运行命令" mvn clean install"构建失败。错误原因:
结果:
引起: org.springframework.boot.context.embedded.EmbeddedServletContainerException: 无法启动嵌入式Tomcat
引起:org.springframework.beans.factory.BeanCreationException: 使用名称创建bean时出错 ' org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration&#39 ;: 注入自动连接的依赖项失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:不能 autowire方法:public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.setFilterChainProxySecurityConfigurer(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List中) 抛出java.lang.Exception;嵌套异常是 org.springframework.beans.factory.BeanExpressionException:Expression 解析失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名称为' securityConfiguration':注入的bean 自动连接依赖失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:不能 autowire字段:私有 org.springframework.security.core.userdetails.UserDetailsService com.orderone.app.config.SecurityConfiguration.userDetailsService; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 使用名称' userDetailsService创建bean&#39 ;:注入自动装配 依赖失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:不能 autowire字段:private com.orderone.app.repository.UserRepository com.orderone.app.security.UserDetailsService.userRepository;嵌套 异常是org.springframework.beans.factory.BeanCreationException: 创建名称为' userRepository'的bean时出错:无法创建内部 豆#39;(内豆)#4711c601'类型 [org.springframework.orm.jpa.SharedEntityManagerCreator]设置时 bean property' entityManager&#39 ;;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名称为'(内部bean)的bean#4711c601':无法解析 引用bean' entityManagerFactory'在设置构造函数时 参数;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为&entityManagerFactory'的bean在类路径中定义 资源 [组织/ springframework的/引导/自动配置/ ORM / JPA / HibernateJpaAutoConfiguration.class]: 调用init方法失败;嵌套异常是 org.hibernate.HibernateException:缺少表:order at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) 〜[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210) 〜[弹簧豆-4.1.7.RELEASE.jar:4.1.7.RELEASE]
引起:org.springframework.beans.factory.BeanCreationException: 无法自动装配方法:public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.setFilterChainProxySecurityConfigurer(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List中) 抛出java.lang.Exception;嵌套异常是 org.springframework.beans.factory.BeanExpressionException:Expression 解析失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名称为' securityConfiguration':注入的bean 自动连接依赖失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:不能 autowire字段:私有 org.springframework.security.core.userdetails.UserDetailsService com.orderone.app.config.SecurityConfiguration.userDetailsService; 嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 使用名称' userDetailsService创建bean&#39 ;:注入自动装配 依赖失败;嵌套异常是 org.springframework.beans.factory.BeanCreationException:不能 autowire字段:private com.orderone.app.repository.UserRepository com.orderone.app.security.UserDetailsService.userRepository;嵌套 异常是org.springframework.beans.factory.BeanCreationException: 创建名称为' userRepository'的bean时出错:无法创建内部 豆#39;(内豆)#4711c601'类型 [org.springframework.orm.jpa.SharedEntityManagerCreator]设置时 bean property' entityManager&#39 ;;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名称为'(内部bean)的bean#4711c601':无法解析 引用bean' entityManagerFactory'在设置构造函数时 参数;嵌套异常是 org.springframework.beans.factory.BeanCreationException:错误 创建名为&entityManagerFactory'的bean在类路径中定义 资源 [组织/ springframework的/引导/自动配置/ ORM / JPA / HibernateJpaAutoConfiguration.class]: 调用init方法失败;嵌套异常是 org.hibernate.HibernateException:缺少表:order