Java 未能将spring集成到mybatis+;泽西网应用

Java 未能将spring集成到mybatis+;泽西网应用,java,spring,jersey-2.0,spring-mybatis,Java,Spring,Jersey 2.0,Spring Mybatis,我已经设法用Jersey和Mybatis完成了我的web应用程序,现在我必须在上面集成Spring,但我遇到了以下错误:org.apache.catalina.LifecycleException:一个子容器在启动过程中失败 考虑到这是我第一次和spring在一起,我肯定我做错了什么。 这是我的AppContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframewo

我已经设法用Jersey和Mybatis完成了我的web应用程序,现在我必须在上面集成Spring,但我遇到了以下错误:org.apache.catalina.LifecycleException:一个子容器在启动过程中失败 考虑到这是我第一次和spring在一起,我肯定我做错了什么。 这是我的AppContext.xml

<?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:c="http://www.springframework.org/schema/c" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
xmlns:p="http://www.springframework.org/schema/p" xmlns:task="http://www.springframework.org/schema/task"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
    http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.3.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.1.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.3.xsd
    http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-4.3.xsd
    http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
    http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.3.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">



<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
    destroy-method="close" p:driverClass="${app.jdbc.driverClassName}"
    p:jdbcUrl="${app.jdbc.url}" p:user="${app.jdbc.username}" p:password="${app.jdbc.password}"
    p:acquireIncrement="10" p:idleConnectionTestPeriod="60" p:maxPoolSize="100"
    p:maxStatements="50" p:minPoolSize="10" />

<tx:annotation-driven transaction-manager="transactionManager" />

<bean id="transactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
</bean>

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="configLocation" value="dao/config.xml" />
</bean>

<bean id="test" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
    <property name="basePackage" value="dao" />
</bean>
</beans>

对于datasource,我创建了一个file.properties,其中包含了我要连接的服务器的信息(以及obv.添加的C3P0JAR)

我已经使用与.xml映射器文件同名的接口,并且这些方法与select/insert/update ecc的id同名

然后我做了一个管理者@Autowire上面提到的接口

我错过了什么?提前谢谢

编辑:my web.xml的结构如下:

<display-name>MostraPersone</display-name>
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:AppContext.xml</param-value>
</context-param>
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
    <servlet-name>TestJersey</servlet-name>
    <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>jersey.config.server.provider.packages</param-name>
        <param-value>logic</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>TestJersey</servlet-name>
    <url-pattern>/mostra/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>/Index.html</welcome-file>
</welcome-file-list>
MostraPersone
上下文配置位置
类路径:AppContext.xml
org.springframework.web.context.ContextLoaderListener
球衣
org.glassfish.jersey.servlet.ServletContainer
com.sun.jersey.api.json.POJOMappingFeature
真的
jersey.config.server.provider.packages
逻辑
1.
球衣
/莫斯特拉/*
/Index.html

此异常的原因通常是由web.xml中的和错误引起的,或者没有相应的或单词错误或其他原因,和对应良好,不应出现此异常

此异常的原因通常是由web.xml中的和错误引起的,或无对应或文字错误或其他原因,且,且对应良好,则不应出现此异常