-
Notifications
You must be signed in to change notification settings - Fork 539
Add support for java modularity #973
Copy link
Copy link
Open
Labels
Description
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.
Reactions are currently unavailable