找不到 Spring Cloud 数据流的仪表板 - 404

问题描述 投票:0回答:2

我正在尝试创建一个 Spring Cloud Dataflow 服务器 v2.10.3,但是当我运行该项目时,我无法访问仪表板,它给了我一个 404 错误...

这是我的主课:

@EnableDataFlowServer
@SpringBootApplication(exclude = {CloudFoundryDeployerAutoConfiguration.class})
public class MainApplication {
    public static void main(String[] args) {
        SpringApplication.run(MainApplication.class, args);
    }
}

这是我添加的一个配置类,用于推翻安全错误:

@Configuration
@EnableWebSecurity
public class CustomSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        // Customize your security configuration here
    }
}

application.yml:

server:
  port: 9393
spring:
  cloud:
    dataflow:
      features:
        streams-enabled: false # works
        schedules-enabled: true #works
        tasks-enabled: true #works
  flyway:
    enabled: false
    url: jdbc:h2:mem:testdb
    user: sa
    password:
    locations: classpath:db/migration
  datasource:
    password:
    username: sa
    driverClassName: org.h2.Driver
    url: jdbc:h2:mem:testdb
    initialization-mode: never
  jpa:
    database-platform: org.hibernate.dialect.H2Dialect
    generate-ddl: false
    hibernate:
      ddl-auto: update
    show-sql: true
  h2:
    console.enabled: true
    console.settings:
      web-allow-others: true

我尝试访问 /dahsboard/index.html 但它不起作用,我希望看到 Spring Cloud Dataflow UI

spring spring-boot spring-cloud spring-cloud-dataflow spring-cloud-dataflow-ui
2个回答
0
投票

我尝试删除安全配置(认为可能限制了访问),但我收到此错误:java.lang.IllegalStateException:找到 WebSecurityConfigurerAdapter 以及 SecurityFilterChain。请仅选择一项。


0
投票

Spring Cloud Dataflow 已打包和交付,并且已打算作为应用程序运行。除非您尝试自定义服务器,否则您只需要运行可执行 jar 即可。有关本地手动安装的更多详细信息,请参阅此处

© www.soinside.com 2019 - 2024. All rights reserved.