How to make a database listener with java?

后端 未结 3 566
清酒与你
清酒与你 2020-12-03 14:38

Greetings all I want to do something like a trigger or a listener (I don\'t know what) that will listen on a specific database table, and with each new record inserted on th

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 15:10

    I assume you mean that the DB content is added through your hibernate code.

    If so, consult this previous answer of mine for how to set up Hibernate Event Listeners with Spring.

    Otherwise, a-horse-with-no-name's answer should be best.

提交回复
热议问题