Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot resilience4j-Spring启动应用程序运行失败_Spring Boot_Maven_Resilience4j - Fatal编程技术网

Spring boot resilience4j-Spring启动应用程序运行失败

Spring boot resilience4j-Spring启动应用程序运行失败,spring-boot,maven,resilience4j,Spring Boot,Maven,Resilience4j,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="htt

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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.telstra.resilience</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>Demo project for Resilience4j</description>

    <properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
    </properties>

    <dependencies>
<dependency> 
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> 
<dependency> 
    <groupId>com.h2database</groupId> 
    <artifactId>h2</artifactId>
    <version>1.4.197</version> 
    <scope>runtime</scope>
</dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        
        <dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-circuitbreaker</artifactId>
    <version>1.3.1</version>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-validation</artifactId>
    <version>2.2.10.RELEASE</version>
</dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
    <dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-all</artifactId>
    <version>1.6.1</version>
</dependency>


<dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-spring-boot2</artifactId>
    <version>1.6.1</version>
</dependency>


    <dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-reactor</artifactId>
    
</dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
    
</dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-circuitbreaker-resilience4j</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>
package com.telstra.resilience.demo;

import java.net.URI;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerResponse;

import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
import static org.springframework.web.reactive.function.server.ServerResponse.permanentRedirect;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
    
    @Bean
    RouterFunction<ServerResponse> redirectRoot() {
        return route(GET("/"),
                req -> permanentRedirect(URI.create("/actuator")).build());
    }

}

4.0.0
org.springframework.boot
spring启动程序父级
2.3.4.1发布
com.telstra.com
演示
0.0.1-快照
演示
Resilience4j的演示项目
1.8
Hoxton.SR8
org.springframework.boot
spring引导启动器数据jpa
com.h2数据库
氢
1.4.197 
运行时
org.springframework.boot
弹簧靴起动器执行器
io.github.resilience4j
弹性4J断路器
1.3.1
org.springframework.boot
弹簧启动启动器验证
2.2.10.发布
org.springframework.boot
弹簧启动机aop
io.github.resilience4j
弹性4J所有
1.6.1
io.github.resilience4j
弹性4J-spring-boot2
1.6.1
io.github.resilience4j
弹性4J反应堆
org.springframework.boot
弹簧启动器webflux
org.springframework.cloud
弹簧-云-启动器-断路器-弹性4J
org.springframework.boot
弹簧起动试验
测试
org.junit.vintage
朱尼特老式发动机
org.springframework.cloud
spring云依赖关系
${spring cloud.version}
聚甲醛
进口
org.springframework.boot
springbootmaven插件
主类 =========================

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.telstra.resilience</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>Demo project for Resilience4j</description>

    <properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>Hoxton.SR8</spring-cloud.version>
    </properties>

    <dependencies>
<dependency> 
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> 
<dependency> 
    <groupId>com.h2database</groupId> 
    <artifactId>h2</artifactId>
    <version>1.4.197</version> 
    <scope>runtime</scope>
</dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        
        <dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-circuitbreaker</artifactId>
    <version>1.3.1</version>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-validation</artifactId>
    <version>2.2.10.RELEASE</version>
</dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
    <dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-all</artifactId>
    <version>1.6.1</version>
</dependency>


<dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-spring-boot2</artifactId>
    <version>1.6.1</version>
</dependency>


    <dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-reactor</artifactId>
    
</dependency>
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
    
</dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-circuitbreaker-resilience4j</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>
package com.telstra.resilience.demo;

import java.net.URI;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerResponse;

import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
import static org.springframework.web.reactive.function.server.ServerResponse.permanentRedirect;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
    
    @Bean
    RouterFunction<ServerResponse> redirectRoot() {
        return route(GET("/"),
                req -> permanentRedirect(URI.create("/actuator")).build());
    }

}
package com.telstra.resilience.demo;
导入java.net.URI;
导入org.springframework.boot.SpringApplication;
导入org.springframework.boot.autoconfigure.springboot应用程序;
导入org.springframework.context.annotation.Bean;
导入org.springframework.web.reactive.function.server.RouterFunction;
导入org.springframework.web.reactive.function.server.ServerResponse;
导入静态org.springframework.web.reactive.function.server.RequestPredicates.GET;
导入静态org.springframework.web.reactive.function.server.RouterFunctions.route;
导入静态org.springframework.web.reactive.function.server.ServerResponse.permanentRedirect;
@SpringBoot应用程序
公共类演示应用程序{
公共静态void main(字符串[]args){
run(DemoApplication.class,args);
}
@豆子
RouterFunction重定向根目录(){
返回路线(GET(“/”),
req->permanentRedirect(URI.create(“/exactor”)).build();
}
}
我有三个服务类和三个控制器。生成成功,但应用程序运行失败,错误如下:

2020-10-18 21:13:15.926信息47072---[main]c.t.resilience.demo.demo应用程序:未设置活动配置文件,返回默认配置文件:默认 2020-10-18 21:13:16.481警告47072---[main]o.s.boot.actuate.endpoint.EndpointId:端点ID“流断路器事件”包含无效字符,请迁移到有效格式。 2020-10-18 21:13:16.482警告47072---[main]o.s.boot.actuate.endpoint.EndpointId:端点ID“hystrix stream circuitbreaker events”包含无效字符,请迁移到有效格式。 2020-10-18 21:13:16.675信息47072---[main].s.d.r.c.RepositoryConfigurationDelegate:在延迟模式下引导Spring数据JPA存储库。 2020-10-18 21:13:16.696信息47072---[main].s.d.r.c.RepositoryConfigurationDelegate:Spring数据存储库扫描在13毫秒内完成。找到0个JPA存储库接口。 2020-10-18 21:13:16.901信息47072---[main]o.s.cloud.context.scope.GenericScope:BeanFactory id=1e499821-9d88-3e1e-b828-98e81518634b 2020-10-18 21:13:17.414信息47072---[main]o.s.s.concurrent.ThreadPoolTaskExecutor:初始化ExecutorService'applicationTaskExecutor' 2020-10-18 21:13:17.437信息47072---[main]com.zaxxer.hikari.HikariDataSource:hikaripol-1-开始。。。 2020-10-18 21:13:17.520信息47072---[main]com.zaxxer.hikari.HikariDataSource:hikaripol-1-启动完成。 2020-10-18 21:13:17.660信息47072---[task-1]o.hibernate.jpa.internal.util.LogHelper:hh000204:正在处理PersistenceUnitInfo[名称:默认值] 2020-10-18 21:13:17.720信息47072---[task-1]org.hibernate.Version:hh000412:hibernate ORM核心版本5.4.21.Final 2020-10-18 21:13:17.905信息47072---[task-1]o.hibernate.annotations.common.Version:HCANN000001:hibernate Commons annotations{5.1.0.Final} 2020-10-18 21:13:18.071信息47072---[task-1]org.hibernate.dialen.dialen:hh000400:使用方言:org.hibernate.dialen.h2dialen 2020-10-18 21:13:18.367信息47072---[task-1]o.h.e.t.j.p.i.JtaPlatformInitiator:HH000490:使用JtaPlatform实现:[org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2020-10-18 21:13:18.378信息47072-[task-1]j.LocalContainerEntityManagerFactoryBean:为持久化单元“默认”初始化了JPA EntityManagerFactory 2020-10-18 21:13:20.160信息47072---[main]o.s.b.a.e.web.EndpointLinksResolver:在基本路径“/actuator”下暴露两个端点 2020-10-18 21:13:20.569警告47072---[main]onfigReactiveWebServerApplicationContext:在上下文初始化过程中遇到异常-取消刷新尝试:org.springframework.beans.factory.BeanCreationException:使用nam创建bean时出错