Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JmsTemplate bean missing in springboot 3

After changing my springboot version from 2.7.5 to 3.0.6 I am getting this error

Description:

Parameter 0 of constructor in com....JmsNotifier required a bean of type 'org.springframework.jms.core.JmsTemplate' that could not be found.

The injection point has the following annotations:
  - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'org.springframework.jms.core.JmsTemplate' in your configuration.

I am getting this error from this service class which works properly in springboot version 2.7.5

@Service
public class JmsNotifier {

    @Autowired
    private JmsTemplate jmsTemplate;
    
   //

}

Here is the dependency

    implementation 'org.springframework.boot:spring-boot-starter-activemq:3.1.0'

Am I missing any additional dependencies?

like image 759
mahfuj asif Avatar asked Oct 31 '25 16:10

mahfuj asif


1 Answers

Apache ActiveMQ "Classic" support is removed from Spring Boot 3.0.0. So we need to use this dependency instead:

    implementation 'org.springframework.boot:spring-boot-starter-artemis'
like image 183
mahfuj asif Avatar answered Nov 03 '25 19:11

mahfuj asif