@TobiasTernent

GitHub: Tobias-Ternent

Thursday, 21 July 2016

How assign bean's property an Enum value in Spring config file?

Had this exact problem today of having to assign a bean's property with an Enum in a Spring XML configuration file. Seems that the answer is easier than expected! You just type in the enum's name directly for the value e.g.
<bean:property name="searchType" value="PRIVATE"/>

http://stackoverflow.com/a/516899

No comments:

Post a Comment