Issue
I found this code that someone wrote:
@Bean
public RetryTemplate retryTemplate( long retryTimeoutMillis )
{
return RetryTemplateFactory.createRetryTemplate( retryTimeoutMillis );
}
Can the @Bean function take a parameter? if so how would that parameter get set?
Solution
From the comments I was able to get this to work:
@Bean
public long retryTimeoutMillis()
{
return 10;
}
@Bean
public RetryTemplate retryTemplate( long retryTimeoutMillis )
{
return RetryTemplateFactory.createRetryTemplate( retryTimeoutMillis );
}
Answered By - JaredCS