Spring: How do I inject ENUM in Spring configuration with generics?

后端 未结 1 1974
一个人的身影
一个人的身影 2021-02-19 15:55

I have a class like this :

public class CheckSetFilter> 
{
   public CheckSetFilter(C         


        
相关标签:
1条回答
  • 2021-02-19 16:50

    All you really have to do is to add a value tag inside the constructor-arg tag.

    <bean id="checkSetFilter" class="com.iba.icomp.core.checks.CheckSetFilter">
        <constructor-arg ref="checkSetManager"/>
        <constructor-arg>
            <value type="your.package.StubCheckId">STUBCHECK1</value>
        </constructor-arg>
    </bean>
    
    0 讨论(0)
提交回复
热议问题