You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a Spring Shell application and compiling it in native mode.
The commands must print a Shell Table with a DTO.
packagecom.reproducer.shell.model;
importjava.util.Objects;
publicclassSampleDTO {
privateStringname;
privateStringsurname;
/** * @return the name */publicStringgetName() {
returnthis.name;
}
/** * @param name the name to set */publicvoidsetName(Stringname) {
this.name = name;
}
/** * @return the surname */publicStringgetSurname() {
returnthis.surname;
}
/** * @param surname the surname to set */publicvoidsetSurname(Stringsurname) {
this.surname = surname;
}
/** * @param name * @param surname */publicSampleDTO(Stringname, Stringsurname) {
this.name = name;
this.surname = surname;
}
/** * */publicSampleDTO() {}
@OverridepublicinthashCode() {
returnObjects.hash(this.name, this.surname);
}
@Overridepublicbooleanequals(Objectobj) {
if (this == obj)
returntrue;
if (!(objinstanceofSampleDTOother))
returnfalse;
returnObjects.equals(this.name, other.name) && Objects.equals(this.surname, other.surname);
}
@OverridepublicStringtoString() {
return"SampleDTO [name=" + this.name + ", surname=" + this.surname + "]";
}
}
Behavior:
JVM Scenario:
When compiling the Java application into a jar and running it, the framework correctly prints the table.
Native Scenario:
When compiling the Java application into an executable (I’m using macOS Sonoma Version 14.7.1), running the command to print the Shell Table causes the application to throw an exception.
The text was updated successfully, but these errors were encountered:
Software:
What I’m doing:
Creating a Spring Shell application and compiling it in native mode.
The commands must print a Shell Table with a DTO.
Behavior:
When compiling the Java application into a jar and running it, the framework correctly prints the table.
When compiling the Java application into an executable (I’m using macOS Sonoma Version 14.7.1), running the command to print the Shell Table causes the application to throw an exception.
The text was updated successfully, but these errors were encountered: