Skip to content

Add support for java modularity #973

@onyn

Description

@onyn

I have ConsulRegistrationCustomizer bean in my configuration class:

    @Bean
    public ConsulRegistrationCustomizer customizer() {
        return r -> {
            var check = r.getService().getCheck();
        };
    }

My project fails to start with error:

java: org.springframework.cloud.consul.model.http.agent.NewService.getCheck() in package org.springframework.cloud.consul.model.http.agent is not accessible (package org.springframework.cloud.consul.model.http.agent is declared in the unnamed module, but module myproject does not read it)

Jar file spring-cloud-consul-core doesn't contain module-info.class nor Automatic-Module-Name manifest entry.

I know that adding jvm argument --add-reads myproject=ALL-UNNAMED is common workaround. But it will be nice if spring supports modules natively.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions