1
resposta

Erro na chamada SpringApplication.run(obj, args);

Está dando um erro de import ao chamar o metodo run.

Os impor

   package br.com.caelum.camel;

import javax.annotation.PostConstruct;

import org.apache.activemq.camel.component.ActiveMQComponent;
import org.apache.camel.CamelContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication

@SpringBootApplication
public class Boot {

    @Autowired
    private CamelContext context;

    @PostConstruct
    public void init() throws Exception {
        context.addComponent("activemq", ActiveMQComponent.activeMQComponent("tcp://localhost:61616"));
    }


    public static void main(String[] args) {


        SpringApplication.run(Boot.class, args);

    }


}

Alguém sabe como resolver ?

Obrigado

1 resposta

Marco qual o erro que esta acontecendo ?