在java中为啥要重写toString 方法?
为了打印我们想要的对象信息,而不是类名加哈希值。
定义对象,看重写前后的输出:
package com.ruoyi.reserve.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import java.util.Objects; /** * @author zs * @date 2019/12/24 15:42 */ //@Data //@AllArgsConstructor //@NoArgsConstructor //@EqualsAndHashCode(callSuper = false) public class Person { private String name; private int age; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Person() { } public Person(String name, int age) { this.name = name; this.age = age; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Person person = (Person) o; return age == person.age && Objects.equals(name, person.name); } @Override public int hashCode() { return Objects.hash(name, age); } // @Override // public String toString() { // return "Person{" + // "name='" + name + '\'' + // ", age=" + age + // '}'; // } }
package com.ruoyi.reserve.study.basic; import com.ruoyi.reserve.pojo.Person; import java.util.*; /** * create by MrZs on 2020/8/20 */ public class ObjectTest { /*public static void main(String[] args) { Person p1 = new Person("Alice", 25); Person p2 = new Person("Alice", 25); Person p3 = p1; //==比较的是对象的引用,对象的引用存储在栈中,对象的引用是对象在堆中的地址。 System.out.println("p1:" + p1);//p1:com.ruoyi.reserve.pojo.Person@deb6432 System.out.println("p2:" + p2);//p2:com.ruoyi.reserve.pojo.Person@28ba21f3 System.out.println("p3:" + p3);//p3:com.ruoyi.reserve.pojo.Person@deb6432 System.out.println("p1==p2:" + (p1 == p2));//p1==p2:false System.out.println("p1==p3:" + (p1 == p3));//p1==p3:true System.out.println("p1 equals p2:" + (p1.equals(p2)));//p1 equals p2:false System.out.println("p1 equals p3:" + (p1.equals(p3)));//p1 equals p3:true System.out.println("p1.hashCode:" + p1.hashCode());//p1.hashCode:233530418 System.out.println("p2.hashCode:" + p2.hashCode());//p2.hashCode:683287027 System.out.println("p3.hashCode:" + p3.hashCode());//p3.hashCode:233530418 System.out.println("p1.System.identityHashCode:" + System.identityHashCode(p1));//p1.System.identityHashCode:233530418 System.out.println("p2.System.identityHashCode:" + System.identityHashCode(p2));//p2.System.identityHashCode:683287027 System.out.println("p3.System.identityHashCode:" + System.identityHashCode(p3));//p3.System.identityHashCode:233530418 }*/ public static void main(String[] args) { Person p1 = new Person("Alice", 25); Person p2 = new Person("Alice", 25); Person p3 = p1; //==比较的是对象的引用,对象的引用存储在栈中,对象的引用是对象在堆中的地址。 System.out.println("p1:" + p1);//p1:Person{name='Alice', age=25} System.out.println("p2:" + p2);//p2:Person{name='Alice', age=25} System.out.println("p3:" + p3);//p3:Person{name='Alice', age=25} System.out.println("p1==p2:" + (p1 == p2));//p1==p2:false System.out.println("p1==p3:" + (p1 == p3));//p1==p3:true System.out.println("p1 equals p2:" + (p1.equals(p2)));//p1 equals p2:true System.out.println("p1 equals p3:" + (p1.equals(p3)));//p1 equals p3:true System.out.println("p1.hashCode:" + p1.hashCode());//p1.hashCode:1963862394 System.out.println("p2.hashCode:" + p2.hashCode());//p2.hashCode:1963862394 System.out.println("p3.hashCode:" + p3.hashCode());//p3.hashCode:1963862394 System.out.println("p1.System.identityHashCode:" + System.identityHashCode(p1));//p1.System.identityHashCode:233530418 System.out.println("p2.System.identityHashCode:" + System.identityHashCode(p2));//p2.System.identityHashCode:683287027 System.out.println("p3.System.identityHashCode:" + System.identityHashCode(p3));//p3.System.identityHashCode:233530418 Set set = new HashSet(); set.add(p1); set.add(p2); System.out.println(set); Map m = new HashMap(); m.put(p1, p1); m.put(p2, p2); System.out.println(m); System.out.println(System.identityHashCode(m.get(p1))); System.out.println(System.identityHashCode(m.get(p2))); } }
重写前:
"C:\Program Files\Java\jdk1.8.0_161\bin\java.exe" "-javaagent:D:\idea2022\IntelliJ IDEA 2022.2.2\lib\idea_rt.jar=53858:D:\idea2022\IntelliJ IDEA 2022.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_161\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\rt.jar;E:\project\nengy-backend\ruoyi-admin\target\classes;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-devtools\2.2.13.RELEASE\spring-boot-devtools-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot\2.2.13.RELEASE\spring-boot-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-context\5.2.12.RELEASE\spring-context-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-expression\5.2.12.RELEASE\spring-expression-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-autoconfigure\2.2.13.RELEASE\spring-boot-autoconfigure-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\io\springfox\springfox-boot-starter\3.0.0\springfox-boot-starter-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-oas\3.0.0\springfox-oas-3.0.0.jar;E:\config\maven\repository-zs\io\swagger\core\v3\swagger-annotations\2.1.2\swagger-annotations-2.1.2.jar;E:\config\maven\repository-zs\io\swagger\core\v3\swagger-models\2.1.2\swagger-models-2.1.2.jar;E:\config\maven\repository-zs\io\springfox\springfox-spi\3.0.0\springfox-spi-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-schema\3.0.0\springfox-schema-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-core\3.0.0\springfox-core-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-spring-web\3.0.0\springfox-spring-web-3.0.0.jar;E:\config\maven\repository-zs\io\github\classgraph\classgraph\4.8.83\classgraph-4.8.83.jar;E:\config\maven\repository-zs\io\springfox\springfox-spring-webmvc\3.0.0\springfox-spring-webmvc-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-spring-webflux\3.0.0\springfox-spring-webflux-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-swagger-common\3.0.0\springfox-swagger-common-3.0.0.jar;E:\config\maven\repository-zs\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;E:\config\maven\repository-zs\io\springfox\springfox-data-rest\3.0.0\springfox-data-rest-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-bean-validators\3.0.0\springfox-bean-validators-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-swagger2\3.0.0\springfox-swagger2-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-swagger-ui\3.0.0\springfox-swagger-ui-3.0.0.jar;E:\config\maven\repository-zs\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;E:\config\maven\repository-zs\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;E:\config\maven\repository-zs\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-beans\5.2.12.RELEASE\spring-beans-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-aop\5.2.12.RELEASE\spring-aop-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;E:\config\maven\repository-zs\io\swagger\swagger-models\1.6.2\swagger-models-1.6.2.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\core\jackson-annotations\2.10.5\jackson-annotations-2.10.5.jar;E:\config\maven\repository-zs\io\swagger\swagger-annotations\1.6.2\swagger-annotations-1.6.2.jar;E:\config\maven\repository-zs\mysql\mysql-connector-java\8.0.22\mysql-connector-java-8.0.22.jar;E:\project\nengy-backend\ruoyi-framework\target\classes;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-web\2.2.13.RELEASE\spring-boot-starter-web-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-json\2.2.13.RELEASE\spring-boot-starter-json-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.5\jackson-datatype-jdk8-2.10.5.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.5\jackson-datatype-jsr310-2.10.5.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.5\jackson-module-parameter-names-2.10.5.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-tomcat\2.2.13.RELEASE\spring-boot-starter-tomcat-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\apache\tomcat\embed\tomcat-embed-core\9.0.41\tomcat-embed-core-9.0.41.jar;E:\config\maven\repository-zs\org\apache\tomcat\embed\tomcat-embed-el\9.0.41\tomcat-embed-el-9.0.41.jar;E:\config\maven\repository-zs\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.41\tomcat-embed-websocket-9.0.41.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-validation\2.2.13.RELEASE\spring-boot-starter-validation-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;E:\config\maven\repository-zs\org\hibernate\validator\hibernate-validator\6.0.22.Final\hibernate-validator-6.0.22.Final.jar;E:\config\maven\repository-zs\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;E:\config\maven\repository-zs\org\springframework\spring-web\5.2.12.RELEASE\spring-web-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-webmvc\5.2.12.RELEASE\spring-webmvc-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-aop\2.2.13.RELEASE\spring-boot-starter-aop-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\aspectj\aspectjweaver\1.9.6\aspectjweaver-1.9.6.jar;E:\config\maven\repository-zs\com\alibaba\druid-spring-boot-starter\1.2.6\druid-spring-boot-starter-1.2.6.jar;E:\config\maven\repository-zs\com\alibaba\druid\1.2.6\druid-1.2.6.jar;E:\config\maven\repository-zs\com\github\penggle\kaptcha\2.3.2\kaptcha-2.3.2.jar;E:\config\maven\repository-zs\com\jhlabs\filters\2.0.235-1\filters-2.0.235-1.jar;E:\config\maven\repository-zs\com\github\oshi\oshi-core\5.7.5\oshi-core-5.7.5.jar;E:\config\maven\repository-zs\net\java\dev\jna\jna\5.8.0\jna-5.8.0.jar;E:\config\maven\repository-zs\net\java\dev\jna\jna-platform\5.8.0\jna-platform-5.8.0.jar;E:\project\nengy-backend\ruoyi-system\target\classes;E:\project\nengy-backend\ruoyi-quartz\target\classes;E:\config\maven\repository-zs\org\quartz-scheduler\quartz\2.3.2\quartz-2.3.2.jar;E:\config\maven\repository-zs\com\mchange\mchange-commons-java\0.2.15\mchange-commons-java-0.2.15.jar;E:\project\nengy-backend\ruoyi-common\target\classes;E:\config\maven\repository-zs\org\springframework\spring-context-support\5.2.12.RELEASE\spring-context-support-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-security\2.2.13.RELEASE\spring-boot-starter-security-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\security\spring-security-config\5.2.8.RELEASE\spring-security-config-5.2.8.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\security\spring-security-core\5.2.8.RELEASE\spring-security-core-5.2.8.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\security\spring-security-web\5.2.8.RELEASE\spring-security-web-5.2.8.RELEASE.jar;E:\config\maven\repository-zs\com\github\pagehelper\pagehelper-spring-boot-starter\1.3.1\pagehelper-spring-boot-starter-1.3.1.jar;E:\config\maven\repository-zs\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.1.4\mybatis-spring-boot-starter-2.1.4.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-jdbc\2.2.13.RELEASE\spring-boot-starter-jdbc-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;E:\config\maven\repository-zs\org\springframework\spring-jdbc\5.2.12.RELEASE\spring-jdbc-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.1.4\mybatis-spring-boot-autoconfigure-2.1.4.jar;E:\config\maven\repository-zs\org\mybatis\mybatis\3.5.6\mybatis-3.5.6.jar;E:\config\maven\repository-zs\org\mybatis\mybatis-spring\2.0.6\mybatis-spring-2.0.6.jar;E:\config\maven\repository-zs\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.3.1\pagehelper-spring-boot-autoconfigure-1.3.1.jar;E:\config\maven\repository-zs\com\github\pagehelper\pagehelper\5.2.1\pagehelper-5.2.1.jar;E:\config\maven\repository-zs\com\github\jsqlparser\jsqlparser\4.0\jsqlparser-4.0.jar;E:\config\maven\repository-zs\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\config\maven\repository-zs\org\apache\commons\commons-lang3\3.9\commons-lang3-3.9.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\core\jackson-databind\2.10.5.1\jackson-databind-2.10.5.1.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\core\jackson-core\2.10.5\jackson-core-2.10.5.jar;E:\config\maven\repository-zs\com\alibaba\fastjson\1.2.76\fastjson-1.2.76.jar;E:\config\maven\repository-zs\commons-io\commons-io\2.10.0\commons-io-2.10.0.jar;E:\config\maven\repository-zs\commons-fileupload\commons-fileupload\1.4\commons-fileupload-1.4.jar;E:\config\maven\repository-zs\org\apache\poi\poi-ooxml\4.1.2\poi-ooxml-4.1.2.jar;E:\config\maven\repository-zs\org\apache\poi\poi\4.1.2\poi-4.1.2.jar;E:\config\maven\repository-zs\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;E:\config\maven\repository-zs\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;E:\config\maven\repository-zs\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;E:\config\maven\repository-zs\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;E:\config\maven\repository-zs\org\apache\poi\poi-ooxml-schemas\4.1.2\poi-ooxml-schemas-4.1.2.jar;E:\config\maven\repository-zs\org\apache\commons\commons-compress\1.19\commons-compress-1.19.jar;E:\config\maven\repository-zs\com\github\virtuald\curvesapi\1.06\curvesapi-1.06.jar;E:\config\maven\repository-zs\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;E:\config\maven\repository-zs\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-data-redis\2.2.13.RELEASE\spring-boot-starter-data-redis-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\data\spring-data-redis\2.2.12.RELEASE\spring-data-redis-2.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\data\spring-data-keyvalue\2.2.12.RELEASE\spring-data-keyvalue-2.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\data\spring-data-commons\2.2.12.RELEASE\spring-data-commons-2.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-tx\5.2.12.RELEASE\spring-tx-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-oxm\5.2.12.RELEASE\spring-oxm-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\io\lettuce\lettuce-core\5.2.2.RELEASE\lettuce-core-5.2.2.RELEASE.jar;E:\config\maven\repository-zs\io\netty\netty-common\4.1.58.Final\netty-common-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-handler\4.1.58.Final\netty-handler-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-resolver\4.1.58.Final\netty-resolver-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-buffer\4.1.58.Final\netty-buffer-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-codec\4.1.58.Final\netty-codec-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-transport\4.1.58.Final\netty-transport-4.1.58.Final.jar;E:\config\maven\repository-zs\io\projectreactor\reactor-core\3.3.13.RELEASE\reactor-core-3.3.13.RELEASE.jar;E:\config\maven\repository-zs\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;E:\config\maven\repository-zs\org\apache\commons\commons-pool2\2.7.0\commons-pool2-2.7.0.jar;E:\config\maven\repository-zs\eu\bitwalker\UserAgentUtils\1.21\UserAgentUtils-1.21.jar;E:\config\maven\repository-zs\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;E:\config\maven\repository-zs\org\eweb4j\fel\0.8\fel-0.8.jar;E:\config\maven\repository-zs\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;E:\config\maven\repository-zs\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;E:\config\maven\repository-zs\antlr\antlr\2.7.7\antlr-2.7.7.jar;E:\config\maven\repository-zs\com\googlecode\aviator\aviator\3.3.0\aviator-3.3.0.jar;E:\config\maven\repository-zs\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;E:\config\maven\repository-zs\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-freemarker\2.2.13.RELEASE\spring-boot-starter-freemarker-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\freemarker\freemarker\2.3.30\freemarker-2.3.30.jar;E:\project\nengy-backend\ruoyi-generator\target\classes;E:\config\maven\repository-zs\org\apache\velocity\velocity\1.7\velocity-1.7.jar;E:\config\maven\repository-zs\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;E:\config\maven\repository-zs\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;E:\config\maven\repository-zs\org\projectlombok\lombok\1.18.16\lombok-1.18.16.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-configuration-processor\2.2.13.RELEASE\spring-boot-configuration-processor-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\apache\xmlbeans\xmlbeans\3.1.0\xmlbeans-3.1.0.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-websocket\2.2.13.RELEASE\spring-boot-starter-websocket-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-messaging\5.2.12.RELEASE\spring-messaging-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-websocket\5.2.12.RELEASE\spring-websocket-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-test\2.2.13.RELEASE\spring-boot-starter-test-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter\2.2.13.RELEASE\spring-boot-starter-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-logging\2.2.13.RELEASE\spring-boot-starter-logging-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\config\maven\repository-zs\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\config\maven\repository-zs\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;E:\config\maven\repository-zs\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;E:\config\maven\repository-zs\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;E:\config\maven\repository-zs\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-test\2.2.13.RELEASE\spring-boot-test-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-test-autoconfigure\2.2.13.RELEASE\spring-boot-test-autoconfigure-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\com\jayway\jsonpath\json-path\2.4.0\json-path-2.4.0.jar;E:\config\maven\repository-zs\net\minidev\json-smart\2.3\json-smart-2.3.jar;E:\config\maven\repository-zs\net\minidev\accessors-smart\1.2\accessors-smart-1.2.jar;E:\config\maven\repository-zs\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;E:\config\maven\repository-zs\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;E:\config\maven\repository-zs\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter\5.5.2\junit-jupiter-5.5.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter-api\5.5.2\junit-jupiter-api-5.5.2.jar;E:\config\maven\repository-zs\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;E:\config\maven\repository-zs\org\junit\platform\junit-platform-commons\1.5.2\junit-platform-commons-1.5.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter-params\5.5.2\junit-jupiter-params-5.5.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter-engine\5.5.2\junit-jupiter-engine-5.5.2.jar;E:\config\maven\repository-zs\org\junit\vintage\junit-vintage-engine\5.5.2\junit-vintage-engine-5.5.2.jar;E:\config\maven\repository-zs\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;E:\config\maven\repository-zs\org\junit\platform\junit-platform-engine\1.5.2\junit-platform-engine-1.5.2.jar;E:\config\maven\repository-zs\junit\junit\4.12\junit-4.12.jar;E:\config\maven\repository-zs\org\mockito\mockito-junit-jupiter\3.1.0\mockito-junit-jupiter-3.1.0.jar;E:\config\maven\repository-zs\org\assertj\assertj-core\3.13.2\assertj-core-3.13.2.jar;E:\config\maven\repository-zs\org\hamcrest\hamcrest\2.1\hamcrest-2.1.jar;E:\config\maven\repository-zs\org\mockito\mockito-core\3.1.0\mockito-core-3.1.0.jar;E:\config\maven\repository-zs\net\bytebuddy\byte-buddy\1.10.19\byte-buddy-1.10.19.jar;E:\config\maven\repository-zs\net\bytebuddy\byte-buddy-agent\1.10.19\byte-buddy-agent-1.10.19.jar;E:\config\maven\repository-zs\org\objenesis\objenesis\2.6\objenesis-2.6.jar;E:\config\maven\repository-zs\org\skyscreamer\jsonassert\1.5.0\jsonassert-1.5.0.jar;E:\config\maven\repository-zs\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;E:\config\maven\repository-zs\org\springframework\spring-core\5.2.12.RELEASE\spring-core-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-jcl\5.2.12.RELEASE\spring-jcl-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-test\5.2.12.RELEASE\spring-test-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\xmlunit\xmlunit-core\2.6.4\xmlunit-core-2.6.4.jar" com.ruoyi.reserve.study.basic.ObjectTest p1:com.ruoyi.reserve.pojo.Person@750e297a p2:com.ruoyi.reserve.pojo.Person@750e297a p3:com.ruoyi.reserve.pojo.Person@750e297a p1==p2:false p1==p3:true p1 equals p2:true p1 equals p3:true p1.hashCode:1963862394 p2.hashCode:1963862394 p3.hashCode:1963862394 p1.System.identityHashCode:233530418 p2.System.identityHashCode:683287027 p3.System.identityHashCode:233530418 [com.ruoyi.reserve.pojo.Person@750e297a] {com.ruoyi.reserve.pojo.Person@750e297a=com.ruoyi.reserve.pojo.Person@750e297a} 683287027 683287027 Process finished with exit code 0
重写后:
"C:\Program Files\Java\jdk1.8.0_161\bin\java.exe" "-javaagent:D:\idea2022\IntelliJ IDEA 2022.2.2\lib\idea_rt.jar=58750:D:\idea2022\IntelliJ IDEA 2022.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_161\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_161\jre\lib\rt.jar;E:\project\nengy-backend\ruoyi-admin\target\classes;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-devtools\2.2.13.RELEASE\spring-boot-devtools-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot\2.2.13.RELEASE\spring-boot-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-context\5.2.12.RELEASE\spring-context-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-expression\5.2.12.RELEASE\spring-expression-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-autoconfigure\2.2.13.RELEASE\spring-boot-autoconfigure-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\io\springfox\springfox-boot-starter\3.0.0\springfox-boot-starter-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-oas\3.0.0\springfox-oas-3.0.0.jar;E:\config\maven\repository-zs\io\swagger\core\v3\swagger-annotations\2.1.2\swagger-annotations-2.1.2.jar;E:\config\maven\repository-zs\io\swagger\core\v3\swagger-models\2.1.2\swagger-models-2.1.2.jar;E:\config\maven\repository-zs\io\springfox\springfox-spi\3.0.0\springfox-spi-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-schema\3.0.0\springfox-schema-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-core\3.0.0\springfox-core-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-spring-web\3.0.0\springfox-spring-web-3.0.0.jar;E:\config\maven\repository-zs\io\github\classgraph\classgraph\4.8.83\classgraph-4.8.83.jar;E:\config\maven\repository-zs\io\springfox\springfox-spring-webmvc\3.0.0\springfox-spring-webmvc-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-spring-webflux\3.0.0\springfox-spring-webflux-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-swagger-common\3.0.0\springfox-swagger-common-3.0.0.jar;E:\config\maven\repository-zs\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;E:\config\maven\repository-zs\io\springfox\springfox-data-rest\3.0.0\springfox-data-rest-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-bean-validators\3.0.0\springfox-bean-validators-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-swagger2\3.0.0\springfox-swagger2-3.0.0.jar;E:\config\maven\repository-zs\io\springfox\springfox-swagger-ui\3.0.0\springfox-swagger-ui-3.0.0.jar;E:\config\maven\repository-zs\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;E:\config\maven\repository-zs\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;E:\config\maven\repository-zs\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-beans\5.2.12.RELEASE\spring-beans-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-aop\5.2.12.RELEASE\spring-aop-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;E:\config\maven\repository-zs\io\swagger\swagger-models\1.6.2\swagger-models-1.6.2.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\core\jackson-annotations\2.10.5\jackson-annotations-2.10.5.jar;E:\config\maven\repository-zs\io\swagger\swagger-annotations\1.6.2\swagger-annotations-1.6.2.jar;E:\config\maven\repository-zs\mysql\mysql-connector-java\8.0.22\mysql-connector-java-8.0.22.jar;E:\project\nengy-backend\ruoyi-framework\target\classes;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-web\2.2.13.RELEASE\spring-boot-starter-web-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-json\2.2.13.RELEASE\spring-boot-starter-json-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.5\jackson-datatype-jdk8-2.10.5.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.5\jackson-datatype-jsr310-2.10.5.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.5\jackson-module-parameter-names-2.10.5.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-tomcat\2.2.13.RELEASE\spring-boot-starter-tomcat-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\apache\tomcat\embed\tomcat-embed-core\9.0.41\tomcat-embed-core-9.0.41.jar;E:\config\maven\repository-zs\org\apache\tomcat\embed\tomcat-embed-el\9.0.41\tomcat-embed-el-9.0.41.jar;E:\config\maven\repository-zs\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.41\tomcat-embed-websocket-9.0.41.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-validation\2.2.13.RELEASE\spring-boot-starter-validation-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;E:\config\maven\repository-zs\org\hibernate\validator\hibernate-validator\6.0.22.Final\hibernate-validator-6.0.22.Final.jar;E:\config\maven\repository-zs\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;E:\config\maven\repository-zs\org\springframework\spring-web\5.2.12.RELEASE\spring-web-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-webmvc\5.2.12.RELEASE\spring-webmvc-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-aop\2.2.13.RELEASE\spring-boot-starter-aop-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\aspectj\aspectjweaver\1.9.6\aspectjweaver-1.9.6.jar;E:\config\maven\repository-zs\com\alibaba\druid-spring-boot-starter\1.2.6\druid-spring-boot-starter-1.2.6.jar;E:\config\maven\repository-zs\com\alibaba\druid\1.2.6\druid-1.2.6.jar;E:\config\maven\repository-zs\com\github\penggle\kaptcha\2.3.2\kaptcha-2.3.2.jar;E:\config\maven\repository-zs\com\jhlabs\filters\2.0.235-1\filters-2.0.235-1.jar;E:\config\maven\repository-zs\com\github\oshi\oshi-core\5.7.5\oshi-core-5.7.5.jar;E:\config\maven\repository-zs\net\java\dev\jna\jna\5.8.0\jna-5.8.0.jar;E:\config\maven\repository-zs\net\java\dev\jna\jna-platform\5.8.0\jna-platform-5.8.0.jar;E:\project\nengy-backend\ruoyi-system\target\classes;E:\project\nengy-backend\ruoyi-quartz\target\classes;E:\config\maven\repository-zs\org\quartz-scheduler\quartz\2.3.2\quartz-2.3.2.jar;E:\config\maven\repository-zs\com\mchange\mchange-commons-java\0.2.15\mchange-commons-java-0.2.15.jar;E:\project\nengy-backend\ruoyi-common\target\classes;E:\config\maven\repository-zs\org\springframework\spring-context-support\5.2.12.RELEASE\spring-context-support-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-security\2.2.13.RELEASE\spring-boot-starter-security-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\security\spring-security-config\5.2.8.RELEASE\spring-security-config-5.2.8.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\security\spring-security-core\5.2.8.RELEASE\spring-security-core-5.2.8.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\security\spring-security-web\5.2.8.RELEASE\spring-security-web-5.2.8.RELEASE.jar;E:\config\maven\repository-zs\com\github\pagehelper\pagehelper-spring-boot-starter\1.3.1\pagehelper-spring-boot-starter-1.3.1.jar;E:\config\maven\repository-zs\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.1.4\mybatis-spring-boot-starter-2.1.4.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-jdbc\2.2.13.RELEASE\spring-boot-starter-jdbc-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\com\zaxxer\HikariCP\3.4.5\HikariCP-3.4.5.jar;E:\config\maven\repository-zs\org\springframework\spring-jdbc\5.2.12.RELEASE\spring-jdbc-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.1.4\mybatis-spring-boot-autoconfigure-2.1.4.jar;E:\config\maven\repository-zs\org\mybatis\mybatis\3.5.6\mybatis-3.5.6.jar;E:\config\maven\repository-zs\org\mybatis\mybatis-spring\2.0.6\mybatis-spring-2.0.6.jar;E:\config\maven\repository-zs\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.3.1\pagehelper-spring-boot-autoconfigure-1.3.1.jar;E:\config\maven\repository-zs\com\github\pagehelper\pagehelper\5.2.1\pagehelper-5.2.1.jar;E:\config\maven\repository-zs\com\github\jsqlparser\jsqlparser\4.0\jsqlparser-4.0.jar;E:\config\maven\repository-zs\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;E:\config\maven\repository-zs\org\apache\commons\commons-lang3\3.9\commons-lang3-3.9.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\core\jackson-databind\2.10.5.1\jackson-databind-2.10.5.1.jar;E:\config\maven\repository-zs\com\fasterxml\jackson\core\jackson-core\2.10.5\jackson-core-2.10.5.jar;E:\config\maven\repository-zs\com\alibaba\fastjson\1.2.76\fastjson-1.2.76.jar;E:\config\maven\repository-zs\commons-io\commons-io\2.10.0\commons-io-2.10.0.jar;E:\config\maven\repository-zs\commons-fileupload\commons-fileupload\1.4\commons-fileupload-1.4.jar;E:\config\maven\repository-zs\org\apache\poi\poi-ooxml\4.1.2\poi-ooxml-4.1.2.jar;E:\config\maven\repository-zs\org\apache\poi\poi\4.1.2\poi-4.1.2.jar;E:\config\maven\repository-zs\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;E:\config\maven\repository-zs\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;E:\config\maven\repository-zs\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;E:\config\maven\repository-zs\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;E:\config\maven\repository-zs\org\apache\poi\poi-ooxml-schemas\4.1.2\poi-ooxml-schemas-4.1.2.jar;E:\config\maven\repository-zs\org\apache\commons\commons-compress\1.19\commons-compress-1.19.jar;E:\config\maven\repository-zs\com\github\virtuald\curvesapi\1.06\curvesapi-1.06.jar;E:\config\maven\repository-zs\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;E:\config\maven\repository-zs\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-data-redis\2.2.13.RELEASE\spring-boot-starter-data-redis-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\data\spring-data-redis\2.2.12.RELEASE\spring-data-redis-2.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\data\spring-data-keyvalue\2.2.12.RELEASE\spring-data-keyvalue-2.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\data\spring-data-commons\2.2.12.RELEASE\spring-data-commons-2.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-tx\5.2.12.RELEASE\spring-tx-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-oxm\5.2.12.RELEASE\spring-oxm-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\io\lettuce\lettuce-core\5.2.2.RELEASE\lettuce-core-5.2.2.RELEASE.jar;E:\config\maven\repository-zs\io\netty\netty-common\4.1.58.Final\netty-common-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-handler\4.1.58.Final\netty-handler-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-resolver\4.1.58.Final\netty-resolver-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-buffer\4.1.58.Final\netty-buffer-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-codec\4.1.58.Final\netty-codec-4.1.58.Final.jar;E:\config\maven\repository-zs\io\netty\netty-transport\4.1.58.Final\netty-transport-4.1.58.Final.jar;E:\config\maven\repository-zs\io\projectreactor\reactor-core\3.3.13.RELEASE\reactor-core-3.3.13.RELEASE.jar;E:\config\maven\repository-zs\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;E:\config\maven\repository-zs\org\apache\commons\commons-pool2\2.7.0\commons-pool2-2.7.0.jar;E:\config\maven\repository-zs\eu\bitwalker\UserAgentUtils\1.21\UserAgentUtils-1.21.jar;E:\config\maven\repository-zs\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;E:\config\maven\repository-zs\org\eweb4j\fel\0.8\fel-0.8.jar;E:\config\maven\repository-zs\org\antlr\antlr-runtime\3.4\antlr-runtime-3.4.jar;E:\config\maven\repository-zs\org\antlr\stringtemplate\3.2.1\stringtemplate-3.2.1.jar;E:\config\maven\repository-zs\antlr\antlr\2.7.7\antlr-2.7.7.jar;E:\config\maven\repository-zs\com\googlecode\aviator\aviator\3.3.0\aviator-3.3.0.jar;E:\config\maven\repository-zs\commons-beanutils\commons-beanutils\1.8.3\commons-beanutils-1.8.3.jar;E:\config\maven\repository-zs\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-freemarker\2.2.13.RELEASE\spring-boot-starter-freemarker-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\freemarker\freemarker\2.3.30\freemarker-2.3.30.jar;E:\project\nengy-backend\ruoyi-generator\target\classes;E:\config\maven\repository-zs\org\apache\velocity\velocity\1.7\velocity-1.7.jar;E:\config\maven\repository-zs\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;E:\config\maven\repository-zs\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;E:\config\maven\repository-zs\org\projectlombok\lombok\1.18.16\lombok-1.18.16.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-configuration-processor\2.2.13.RELEASE\spring-boot-configuration-processor-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\apache\xmlbeans\xmlbeans\3.1.0\xmlbeans-3.1.0.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-websocket\2.2.13.RELEASE\spring-boot-starter-websocket-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-messaging\5.2.12.RELEASE\spring-messaging-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-websocket\5.2.12.RELEASE\spring-websocket-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-test\2.2.13.RELEASE\spring-boot-starter-test-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter\2.2.13.RELEASE\spring-boot-starter-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-starter-logging\2.2.13.RELEASE\spring-boot-starter-logging-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;E:\config\maven\repository-zs\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;E:\config\maven\repository-zs\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;E:\config\maven\repository-zs\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;E:\config\maven\repository-zs\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;E:\config\maven\repository-zs\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-test\2.2.13.RELEASE\spring-boot-test-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\boot\spring-boot-test-autoconfigure\2.2.13.RELEASE\spring-boot-test-autoconfigure-2.2.13.RELEASE.jar;E:\config\maven\repository-zs\com\jayway\jsonpath\json-path\2.4.0\json-path-2.4.0.jar;E:\config\maven\repository-zs\net\minidev\json-smart\2.3\json-smart-2.3.jar;E:\config\maven\repository-zs\net\minidev\accessors-smart\1.2\accessors-smart-1.2.jar;E:\config\maven\repository-zs\org\ow2\asm\asm\5.0.4\asm-5.0.4.jar;E:\config\maven\repository-zs\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;E:\config\maven\repository-zs\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter\5.5.2\junit-jupiter-5.5.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter-api\5.5.2\junit-jupiter-api-5.5.2.jar;E:\config\maven\repository-zs\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;E:\config\maven\repository-zs\org\junit\platform\junit-platform-commons\1.5.2\junit-platform-commons-1.5.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter-params\5.5.2\junit-jupiter-params-5.5.2.jar;E:\config\maven\repository-zs\org\junit\jupiter\junit-jupiter-engine\5.5.2\junit-jupiter-engine-5.5.2.jar;E:\config\maven\repository-zs\org\junit\vintage\junit-vintage-engine\5.5.2\junit-vintage-engine-5.5.2.jar;E:\config\maven\repository-zs\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;E:\config\maven\repository-zs\org\junit\platform\junit-platform-engine\1.5.2\junit-platform-engine-1.5.2.jar;E:\config\maven\repository-zs\junit\junit\4.12\junit-4.12.jar;E:\config\maven\repository-zs\org\mockito\mockito-junit-jupiter\3.1.0\mockito-junit-jupiter-3.1.0.jar;E:\config\maven\repository-zs\org\assertj\assertj-core\3.13.2\assertj-core-3.13.2.jar;E:\config\maven\repository-zs\org\hamcrest\hamcrest\2.1\hamcrest-2.1.jar;E:\config\maven\repository-zs\org\mockito\mockito-core\3.1.0\mockito-core-3.1.0.jar;E:\config\maven\repository-zs\net\bytebuddy\byte-buddy\1.10.19\byte-buddy-1.10.19.jar;E:\config\maven\repository-zs\net\bytebuddy\byte-buddy-agent\1.10.19\byte-buddy-agent-1.10.19.jar;E:\config\maven\repository-zs\org\objenesis\objenesis\2.6\objenesis-2.6.jar;E:\config\maven\repository-zs\org\skyscreamer\jsonassert\1.5.0\jsonassert-1.5.0.jar;E:\config\maven\repository-zs\com\vaadin\external\google\android-json\0.0.20131108.vaadin1\android-json-0.0.20131108.vaadin1.jar;E:\config\maven\repository-zs\org\springframework\spring-core\5.2.12.RELEASE\spring-core-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-jcl\5.2.12.RELEASE\spring-jcl-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\springframework\spring-test\5.2.12.RELEASE\spring-test-5.2.12.RELEASE.jar;E:\config\maven\repository-zs\org\xmlunit\xmlunit-core\2.6.4\xmlunit-core-2.6.4.jar" com.ruoyi.reserve.study.basic.ObjectTest p1:Person{name='Alice', age=25} p2:Person{name='Alice', age=25} p3:Person{name='Alice', age=25} p1==p2:false p1==p3:true p1 equals p2:true p1 equals p3:true p1.hashCode:1963862394 p2.hashCode:1963862394 p3.hashCode:1963862394 p1.System.identityHashCode:233530418 p2.System.identityHashCode:683287027 p3.System.identityHashCode:233530418 [Person{name='Alice', age=25}] {Person{name='Alice', age=25}=Person{name='Alice', age=25}} 683287027 683287027 Process finished with exit code 0
object类里的toString只是把字符串的直接打印,数字的要转化成字符再打印,而对象,则直接打印该对象的hash码。
如果错过太阳时你流了泪,那你也要错过群星了。
在所有的矛盾中,要优先解决主要矛盾,其他矛盾也就迎刃而解。
不要做个笨蛋,为失去的郁郁寡欢,聪明的人,已经找到了解决问题的办法,或正在寻找。
在所有的矛盾中,要优先解决主要矛盾,其他矛盾也就迎刃而解。
不要做个笨蛋,为失去的郁郁寡欢,聪明的人,已经找到了解决问题的办法,或正在寻找。