Dynamic schema in Hibernate @Table Annotation

前端 未结 3 2006
孤街浪徒
孤街浪徒 2021-01-05 13:27

Imagine you have four MySQL database schemas across two environments:

  • foo (the prod db),
  • bar (the in-progress restructuring
3条回答
  •  难免孤独
    2021-01-05 13:54

    You can override the settings you declare in the annotations using a orm.xml file. Configure maven or whatever you use to generate your deployable build artifacts to create that override file for the test environment.

提交回复
热议问题