我计划在MySQL服务器上使用Spring Data JPA和Spring Boot。在考虑运行连接到数据库的多个Spring Boot应用程序实例时,有哪些挑战、注意事项和最佳实践。据我所知,当Hibernate完全拥有数据库时,应该考虑Hibernate,这在构建单片应用程序的情况下是很好的,但在运行多个实例(微服务)的情况下,每个实例将如何管理、更新状态。请给我引路。
and the entity did persist. private AuditEventRepository repository;无论我使用@NotNull还是@Column(nullable = false),数据库都是使用列上的not null标志创建的:
Hibernate: create table audit_log (id binary
我想了解一下通用仓库的模式。我有一个通用服务接口,它是由抽象服务实现的,而抽象服务是由所有服务实现扩展的。我希望确保所有CRUD操作和按标准/规范进行的搜索都发生在抽象服务中。我的所有存储库都是扩展JpaRepository和JpaSpecificationExecutor的接口。但是,我无法使用抽象服务中的自动存储库执行findAll(规范,可分页)。{摘要服务:
public abstract class Foo<T, S&g