是否可以从注释中读取 YAML 属性?

时间:2021-05-06 08:01:56

标签: spring spring-boot spring-data-jpa

我需要将 db shchema 传递给注释,是否可以从注释中读取而不创建中间变量?

类似的东西 -

  @Id
  @SequenceGenerator(name = "${DB_ESCHEMA} + SEQ.ID")
  private Long id;

1 个答案:

答案 0 :(得分:0)

不,您不能在 JPA 注释中使用 Spring EL。

但是为什么要使用架构名称?和其他表格不一样吗?

相关问题