单一的 zh 和 zh-CN 均属于废弃用法。

问题主要在于,zh 现在不是语言code了,而是macrolang,能作为语言code的是cmn(国语)、yue(粤语)、wuu(吴语)等。我通常建议写成 zh-cmn 而不是光写 cmn,主要是考虑兼容性(至少可匹配 zh),有不少软件和框架还没有据此更新。

zh-CN 的问题还在于,其实多数情况下标记的是简体中文,但是不恰当的使用了地区,这导致同样用简体中文的 zh-SG(新加坡)等无法匹配。更典型的是 zh-TW 和 zh-HK。所以其实应该使用 zh-Hans / zh-Hant 来表示简体和繁体。那么完整的写法就是 zh-cmn-Hans,表示简体中文书写的普通话/国语。一般而言没有必要加地区代码,除非要表示地区特异性,一般是词汇不一样(比如维基百科的大陆简体和新马简体)。

如何标记的例子:

  1. 简体中文页面:html lang=zh-cmn-Hans
  2. 繁体中文页面:html lang=zh-cmn-Hant
  3. 英语页面:html lang=en
作者:贺师俊
链接:https://www.zhihu.com/question/20797118/answer/16809331
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

This is known issue in Hibernate, see https://hibernate.atlassian.net/browse/HHH-8805

Solution is to add @org.hibernate.annotations.ForeignKey(name = "none") on the mapped side.

class Parent {

  @OneToMany(mappedBy="parent", cascade=CascadeType.ALL, orphanRemoval=true)
  @OrderColumn(name="childIndex")
  @org.hibernate.annotations.ForeignKey(name = "none")
  public List<Child> getChildren() {
    return children;
  }

}

Note: Prefer the JPA 2.1 introduced javax.persistence.ForeignKey instead. The native annotation is deprecated.

answerd by Bustanil Arifin and sophros How do I disable Hibernate foreign key constraint on a bidirectional association?

Here is the difference:

  • addFlashAttribute() actually stores the attributes in a flashmap (which is internally maintained in the users session and removed once the next redirected request gets fulfilled)
  • addAttribute() essentially constructs request parameters out of your attributes and redirects to the desired page with the request parameters.

So the advantage of addFlashAttribute() will be that you can store pretty much any object in your flash attribute (as it is not serialized into request params at all, but maintained as an object), whereas with addAttribute() since the object that you add gets transformed to a normal request param, you are pretty limited to the object types like String or primitives.

answerd by Biju Kunjummen https://stackoverflow.com/questions/14470111/spring-redirectattributes-addattribute-vs-addflashattribute

denis-anisimov:

This looks like a bug in Spring: spring-projects/spring-boot#27147

JS WebSocket class can't connect to the server and there is nothing to fix on our side.
The same happens with:

  • console code ws = new WebSocket("ws://localhost: 35729");
  • Live reload Chrome extension: it doesn't work with 2.5.2

pleku:
Fixed in Spring Boot 2.4.9 & 2.5.3

Live reload is broken starting with Spring Boot 2.5.2 #11375
DevTools' LiveReload support's HTTP header handling is case sensitive #26813

Question

Whenever login to debian OS via ssh will get this message:

Linux ds1821-virtual-debian 5.10.0-15-amd64 #1 SMP Debian 5.10.120-1 (2022-06-09) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Answer

As Joan notes, motd is the key. The Debian wiki has good information on how the motd file is generated at boot and how to modify it. Check out the How to keep your /etc/motd from being overwritten section to make permanent motd changes.

If you just want to disable it for your user, create a .hushlogin file in your home directory:

touch ~/.hushlogin

https://raspberrypi.stackexchange.com/questions/32006/remove-gnu-licence-and-no-warranty-thing-when-logging-into-ssh/32007