zoukankan      html  css  js  c++  java
  • 运行可执行jar包出错

    用maven创建的项目(可执行jar包),用eclipse开发过程中没问题,但是通过控制台java -jar指令执行出现以下错误:Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx]

    Offending resource: class path resource [applicationContext.xml]

    解决方法:

    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>1.2.1</version>
    <executions>
    <execution>
    <phase>package</phase>
    <goals>
    <goal>shade</goal>
    </goals>
    <configuration>
    <transformers>
    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
    <mainClass>com.test.App</mainClass>
    </transformer>
    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    <resource>META-INF/spring.handlers</resource>
    </transformer>

    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    <resource>META-INF/spring.schemas</resource>
    </transformer>
    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
    <resource>META-INF/spring.tooling</resource>
    </transformer>
    </transformers>
    </configuration>
    </execution>
    </executions>
    </plugin>
    </plugins>

  • 相关阅读:
    位操作(Bitmanipulation)
    访问固定的内存位置(Accessingfixed memory locations)
    poj2501
    poj2664
    poj2535
    poj2579
    poj2495
    图形的信息编码与表征
    计算机视觉计算理论与算法基础computer vision algorithms and the theoretical calculation based
    计算机视觉的理论(北大 秦其明)
  • 原文地址:https://www.cnblogs.com/symcious/p/5550628.html
Copyright © 2011-2022 走看看