Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
春は豆をシングルトンとしてロードすることを理解しています。しかし、春が戦争になったらどうなるでしょう。戦争には独自のクラスローダーがあるので、私はこれを尋ねます。
クラスの読み込みジョブを webapp のクラス ローダーに委譲し、クラスが読み込まれると、そのクラスの単一のオブジェクトを作成し、同じインスタンスを使用して、参照されるすべての場所に注入します (この Bean のスコープがシングルトンである場合)。 )。