今天开发过程中,遇到 这样的一个问题

  

public class Test {
    public static void main(String[] args) {
        Integer aa = 123456;
        Integer bb = 123456;
        System.out.println(aa == bb);
    }



}

  按理说 应该返回为true,但是 测试了几次 一直是false。忽然想到Integer 的值是 -128到127.。。

 

 

2.注解Controller 和RestController

前者会返回一个jsp页面,后者才是rest风格的json数据

相关文章:

  • 2022-12-23
  • 2022-01-23
  • 2022-02-07
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2023-02-20
猜你喜欢
  • 2021-04-22
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
相关资源
相似解决方案