在我的SpringBoot创建的项目中,
我在@SpringBootApplication中添加了2个主要类.
因为如果我使用STS,我可以在开始调试时选择一个主应用程序.
但我发现当SpringDemoApplication启动时,RabbitMQApplication也在运行.
这是规格吗?工作得当吗?
这是重现的样本 https://github.com/MariMurotani/SpringDemo/tree/6_rabbitMQ
SpringDemoApplication
package demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
@SpringBootApplication
public class SpringDemoApplication {
public static void main(String[] args) {
SpringApplication application = new SpringApplication(SpringDemoApplication.class);
ApplicationContext context = application.run(args);
}
}
Run Code Online (Sandbox Code Playgroud)
RabbitMQApplication
package demo;
import java.util.Date;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import demo.configs.Const;
import demo.dto.Mail;
@SpringBootApplication
public class RabbitMQApplication implements …Run Code Online (Sandbox Code Playgroud) 我一直在尝试在我的环境中安装delve.但是,钻孔无法启动,我无法解决这个问题.
操作系统:OSX Yosemite 10.10.4
达尔文内核版本14.4.0
$GOPATH/bin/dlv debug main.go
could not launch process: could not fork/exec
Run Code Online (Sandbox Code Playgroud)
https://github.com/derekparker/delve/wiki/Building
我安装了以下上面提到的步骤URL.安装成功并且以root用户正确启动.除root用户外,Delve返回错误.
1)我已经创建了认证和签名申请
2)我在make命令之前杀死了taskgated,但它在make之后再次启动.
3)如果我重命名这些文件,则此命令会失败./System/Library/LaunchDaemons/com.apple.taskgated-helper.plist /System/Library/LaunchDaemons/com.apple.taskgated.plist
codesign -s "dlv-cert" /Users/murotanimari/work/bin/dlv
error: One or more parameters passed to a function were not valid.
Run Code Online (Sandbox Code Playgroud)