Spring - using static final fields (constants) for bean initialization

前端 未结 5 955
轻奢々
轻奢々 2020-12-07 17:07

is it possible to define a bean with the use of static final fields of CoreProtocolPNames class like this:




        
5条回答
  •  温柔的废话
    2020-12-07 18:02

    Or, as an alternative, using Spring EL directly in XML:

    
    

    This has the additional advantage of working with namespace configuration:

    
    

提交回复
热议问题