ERROR ContextLoader:351 - Context initialization failed

在尝试添加收派员时遇到问题,页面请求的action在测试中无误。执行了maven clean、工程编译文件clean以及重新安装parentproject,问题依旧存在。发现原因是将CourierRepository接口错误地放在了service层,而配置的Spring Data JPA扫描路径仅包含dao层,导致接口未被扫描到,因此初始化失败。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天在做bos项目第3天的代码:
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building bos_management 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.1:run (default-cli) @ bos_management >>>
[WARNING] The POM for com.oracle:ojdbc6:jar:11.2.0.1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bos_management ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ bos_management ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to D:\class\bos\bos\bos_management\target\classes
[WARNING] 未与 -source 1.7 一起设置引导类路径
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.1:run (default-cli) @ bos_management <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.1:run (default-cli) @ bos_management ---
[INFO] Running war on http://localhost:9001/
[INFO] Using existing Tomcat server configuration at D:\class\bos\bos\bos_management\target\tomcat
[INFO] create webapp with contextPath: 
十一月 19, 2017 10:42:38 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-9001"]
十一月 19, 2017 10:42:38 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Tomcat
十一月 19, 2017 10:42:38 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.37
十一月 19, 2017 10:42:48 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
十一月 19, 2017 10:42:49 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
22:42:49,071  INFO ContextLoader:305 - Root WebApplicationContext: initialization started
22:42:49,285  INFO XmlWebApplicationContext:578 - Refreshing Root WebApplicationContext: startup date [Sun Nov 19 22:42:49 CST 2017]; root of context hierarchy
22:42:49,359  INFO XmlBeanDefinitionReader:317 - Loading XML bean definitions from class path resource [applicationContext.xml]
22:42:50,667  INFO PropertySourcesPlaceholderConfigurer:172 - Loading properties file from class path resource [config.properties]
22:42:50,727  INFO AutowiredAnnotationBeanPostProcessor:153 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
22:42:50,959  INFO MLog:80 - MLog clients using log4j logging.
22:42:51,055  INFO C3P0Registry:204 - Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
22:42:51,650  INFO LocalContainerEntityManagerFactoryBean:336 - Building JPA container EntityManagerFactory for persistence unit 'default'
22:42:51,724  INFO LogHelper:31 - HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
22:42:52,060  INFO Version:37 - HHH000412: Hibernate Core {
  5.0.1.Final}
22:42:52,077  INFO Environment:213 - HHH000206: hibernate.properties not found
22:42:52,084  INFO Environment:317 - HHH000021: Bytecode provider name : javassist
22:42:52,304  INFO Version:66 - HCANN000001: Hibernate Commons Annotations {
  5.0<
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值