ユーザーログインに基づいて異なるデータベースに接続したいので、TransacionManager Bean を Prototype スコープとして使用しており、毎回 transacionManager Bean を作成しており、うまく機能しています。しかし、アプリケーションの範囲が拡大し、どれだけ安定するかは良いことですか?
何か案は ?ありがとう。
@Bean(initMethod = "init", destroyMethod = "destroy")
@Scope(value = "prototype")
public PlatformTransactionManager transactionManager() {