小编kot*_*hko的帖子

Tomcat上的Spring启动war文件部署

我使用Spring Boot 1.2.4.RELEASE和gs-rest-service源文件.我有:

127.0.0.1 - - [18/Jun/2015:09:59:25 +0300] "GET /gs-rest-service-0.1.0/ HTTP/1.1" 404 1021
Run Code Online (Sandbox Code Playgroud)

Tomcat日志中没有其他例外.

我已阅读相关问题,但我的测试没有运行. Spring Boot War部署到Tomcat

我已经阅读了howto-create-a-deployable-warPackaging可执行jar和war文件.

也许我想念一些东西.

我的来源:

1.pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.springframework</groupId>
    <artifactId>gs-rest-service</artifactId>
    <version>0.1.0</version>
    <packaging>war</packaging>

    <properties>        
        <start-class>hello.Application</start-class>
        <java.version>1.8</java.version>
    </properties>


    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.2.4.RELEASE</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>        
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>spring-releases</id> …
Run Code Online (Sandbox Code Playgroud)

deployment tomcat war spring-boot

4
推荐指数
1
解决办法
5125
查看次数

JMeter 与 Groovy ClassNotFoundException:org.apache.ivy.core.report.ResolveReport

我在 JMeter 中为计时器创建了一个小 Groove 脚本:

@Grapes([
@Grab(group = 'joda-time', module = 'joda-time', version = '2.9.2')])

import org.joda.time.*;

dataTime = new DateTime();
if (dataTime.getMinuteOfHour() % 2) {
    1000
} else {
    60000
}
Run Code Online (Sandbox Code Playgroud)

在IDE中运行良好。

但在 JMeter 2.13 (Groovy Timer) 中我遇到了一个错误:

2016/03/09 15:02:52 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.NoClassDefFoundError: org/apache/ivy/core/report/ResolveReport
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.privateGetPublicMethods(Unknown Source)
    at java.lang.Class.getMethods(Unknown Source)
    at java.beans.Introspector.getPublicDeclaredMethods(Unknown Source)
    at java.beans.Introspector.getTargetMethodInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:3289)
    at java.security.AccessController.doPrivileged(Native Method)
    at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:3287)
    at …
Run Code Online (Sandbox Code Playgroud)

groovy timer jmeter noclassdeffounderror

2
推荐指数
1
解决办法
1542
查看次数