I am trying to create a MQConnectionFactory using @ Bean annotation which is invoked by SpringBootApplication. Below is the exception stack.
`Startup failed ’org.springframework.beans.factory.config.BeanExpressionException’ expression parsing fail nested exception is org.springframework.expression.spel.spelevaluationexception EL1008e property or field ‘queueManagerName ’can not be found on the object of type org.springframework.beans.factory.config.beanexpressioncontext
Config class is described below *:-
@Configuration
class MQConfig{
@Value("${queue.manager}")
private String queueManagerName;
@Bean
public MQConnectionFactory defaultConnectionFactory(){
MQConnectionFactory mqConnectionFactory = new MQConnectionFactory();
mqConnectionFactory.setQueueManagerName(queueManagerName);
return mqConnectionFactory;
}
}
Usage is like below *:-
@Component
QueueMsgReceiver{
@JmsListener(destination="${main.job.queue}",concurrency="1")
public void updateMsg(Message jsonMsg) throws JmsException,ExecutionException,InterruptedException{
}
}
Invoker is like below*:-
@EnableJMS
@SpringBootApplication(exclude={FreeMarkerAutoConfiguration.class})
public class Application{
public static void main(String args[])
{
SpringApplication.run(Application.class,args);
}
}