Creating a Spring enum bean and passing the value of a method call

后端 未结 1 1482
独厮守ぢ
独厮守ぢ 2021-02-19 01:01

I have this Singleton:

   public enum Elvis {
       INSTANCE;
       private int age;

       public int getAge() {
           return age;
       }
   }
         


        
1条回答
  •  太阳男子
    2021-02-19 01:19

    You can use Spring Expression Language:

    
    

    or without elvis bean:

    
    

    0 讨论(0)
提交回复
热议问题