-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring aot compile doesnot process jedis-HostandPort class which cause below exception when packaging can somebody tell me how to fix #198
Comments
You appear to be trying to bind configuration properties directly to If you have any further questions, please follow up on Stack Overflow or Gitter. We prefer to use GitHub issues only for bugs and enhancements. |
do you mean i create a sub class as extends HostandPort class ,and try to compile ? thks and i will try and get a response |
i have used a dataClass init configuration for jedis config insteadof use HostAndPort class directly,like below ,but the exeception still ouucred while native compiling . @ConfigurationProperties(prefix = "jedis")
@Data
public class RedisConfigProperties {
// host list
private List<RedisHost> hosts = new ArrayList<>();
@Data
public static class RedisHost{
private String host;
private int port;
}
public Set<HostAndPort> getRedisHosts(){
return new HashSet<>(U.map(hosts, o -> new HostAndPort(o.getHost(), o.getPort())));
}
} |
As Andy stated above:
Please post your question as suggested, with as much detail and sample code as possible so that the community can try to help you. |
102 18:24:05.549 1 HallMainStarter51: Starting HallMainStarter using Java 17.0.9 with PID 4639 (/Users/andy/hall/wepoker-hall/target/classes started by andy in /Users/andy/hall/wepoker-hall)
0102 18:24:05.550 1 HallMainStarter644: The following 1 profile is active: "dev"
Exception in thread "main" org.springframework.boot.context.properties.bind.MissingParametersCompilerArgumentException: Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it:
redis.clients.jedis.HostAndPort
maven config like below
org.springframework.boot spring-boot-maven-plugin ${mainClass} repackage org.projectlombok lombokorg.springframework.boot
spring-boot-starter-parent
3.1.6
The text was updated successfully, but these errors were encountered: