Excepion in thread "main" org.springframework.beans.factory.
parsing.BeanDefinitionPersingException:
Configuration problem:Unable to locate Spring NamespaceHandler for XML
schema namespace [http://www.springframework.org/schema/context] Offending resource:
class path resource [applicationContext.xml]
applicationContext.xml配置如下:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd">
<context:component-scan base-package="com.jytime"></context:component-scan>
<!-- 数据库连接池 非单例属性 scope="prototype" -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="jdbcUrl" value="jdbc:sqlserver://192.168.2.101;DatabaseName=pm" />
<property name="user" value="sa" />
<property name="password" value="123" />
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"></property>
</bean>
<task:scheduler id="taskScheduler" pool-size="100"></task:scheduler>
<task:scheduled-tasks scheduler="taskScheduler">
<task:scheduled ref="taskRemind" method="execute1" cron="0 0 10 * * ?" />
</task:scheduled-tasks>
pom.xml配置如下:
复制代码
org.springframework
spring-core
4.1.7.RELEASE
org.springframework
spring-beans
4.1.7.RELEASE
org.springframework
spring-context
4.1.7.RELEASE
org.springframework
spring-test
4.1.7.RELEASE
org.springframework
spring-jdbc
4.1.7.RELEASE
org.springframework.ws
spring-ws-core
2.4.0.RELEASE
com.microsoft.sqlserver
sqljdbc4
4.0
jar
compile
c3p0
c3p0
0.9.1.2
jar
compile
junit
junit
4.11
test
org.slf4j
slf4j-api
1.6.1
jar
compile
log4j
log4j
1.2.16
compile
org.slf4j
slf4j-log4j12
1.6.1
jar
compile
maven-assembly-plugin
com.jytime.remind.App
jar-with-dependencies
package
single
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
META-INF/spring.handlers
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
META-INF/spring.schemas
复制代码
请高人帮忙解答一下,实在不知道怎么回事