小编Kni*_*ies的帖子

Instant as timestamp fails with Spring Boot 3 in combination with PostgreSQL

Spring Boot 3 (Hibernate 6.1) in combination with PostgreSQL seems to have a problem with Instant values mapped to SQL timestamps (without time zone), as the following test case fails. Values read differ from the written values by the amount of the local time zone offset.

The test case executes successfully when using the H2 test database or when switching back to Spring Boot 2.7.6 (Hibernate 5.6).

JPA entity:

@Entity
public class MyEntity {

  @Id
  UUID id …
Run Code Online (Sandbox Code Playgroud)

java postgresql hibernate spring-boot

7
推荐指数
1
解决办法
3120
查看次数

更新 npm 依赖项,同时保留 Angular 版本

我想更新我的项目的依赖项,但保留 Angular 版本。

\n

由于npm update仅在 package.json 中指定的版本范围内进行更新,因此我选择npm-check-updates ( ncu) 来更广泛地检测可能的更新:

\n
ncu --minimal --peer --reject @angular*\n
Run Code Online (Sandbox Code Playgroud)\n

输出包括两种类型的建议更新(示例):

\n
glob    ^9.2.1  \xe2\x86\x92  ^10.2.2\njest   ^28.1.3  \xe2\x86\x92  ^29.5.0\n
Run Code Online (Sandbox Code Playgroud)\n

\xe2\x9c\x85 该glob行就是我正在寻找的:可以更新的依赖项。

\n

jest另一方面,\xe2\x9d\x97 更新(和其他类似)会导致冲突

\n
npm WARN Conflicting peer dependency: jest@28.1.3\nnpm WARN   peer jest@"^28.0.0" from jest-preset-angular@12.2.2\nnpm WARN     jest-preset-angular@"12.2.2" from @angular-builders/jest@14.1.0\n
Run Code Online (Sandbox Code Playgroud)\n

表明@angular-builders/jest(在其他情况下也@angular-devkit/build-angular@angular/compiler-cli)也必须更新到下一个主要版本(Angular 15),这是我想避免的。

\n

为什么ncu --peer未能检测到这一点(因此建议更新jest)?

\n

在跨传递依赖项与现有(或特定)Angular 版本保持兼容性的约束下,如何才能检测到可能的依赖项更新?

\n

npm jestjs angular npm-check-updates

6
推荐指数
0
解决办法
829
查看次数