spring 页面没有找到- 404

rekjcdws  于 2023-09-29  发布在  Spring
关注(0)|答案(1)|浏览(92)

我正在尝试创建一个Spring Cloud DataFlow Server v2.10.3,但当我运行项目时,我无法访问 Jmeter 板,它给了我一个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

wsewodh2

wsewodh21#

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

相关问题