Я не могу запустить проект в Tomcat.
Узнав информацию об ошибке Tomcat, я думаю, что ошибка исходит от картографа или других лиц.Следующая информация об ошибке более важна для проблемы в журнале локального хоста Tomcat.
Error creating bean with name 'dictServiceImpl':
Unsatisfied dependency expressed through field 'dictMapper'
Каталог проекта
Журнал локального хоста Tomcat
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'dictServiceImpl': Unsatisfied dependency expressed through field 'dictMapper';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'dictMapper' defined in file [/Users/sky/IdeaProjects/SSM Framework/simple/target/simple/WEB-INF/classes/tk/mybatis/web/mapper/DictMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed;
nested exception is org.springframework.core.NestedIOException:
Failed to parse config resource: class path resource [mybatis-config.xml];
nested exception is org.apache.ibatis.builder.BuilderException:
Error parsing SQL Mapper Configuration.
Cause: org.apache.ibatis.logging.LogException: Error setting Log implementation.
Cause: java.lang.NoClassDefFoundError: org/apache/log4j/Priority
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
applicationContext.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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:component-scan base-package="tk.mybatis.*.service.impl" />
<bean id="dataSource"
class="org.apache.ibatis.datasource.pooled.PooledDataSource">
<property name="driver" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/mybatis"/>
<property name="username" value="root"/>
<property name="password" value="12345"/>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" >
<property name="configLocation" value="classpath:mybatis-config.xml"/>
<property name="dataSource" ref="dataSource"/>
<property name="mapperLocations">
<array>
<value>classpath:tk/mybatis/**/mapper/*.xml</value>
</array>
</property>
<property name="typeAliasesPackage" value="tk.mybatis.web.model"/>
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="tk.mybatis.**.mapper"/>
</bean>
</beans>