Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arthas-spring-boot-starter里的默认 disabledCommands = "stop" 配置不生效 #1853

Closed
hengyunabc opened this issue Jul 8, 2021 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@hengyunabc
Copy link
Collaborator

原因是之前的配置方式是把所有 arthas.* 的配置注入到 arthasConfigMap 这个 map里,然后再提取转换为 Arthas初始化的配置:

	@ConfigurationProperties(prefix = "arthas")
	@ConditionalOnMissingBean
	@Bean
	public HashMap<String, String> arthasConfigMap() {
		return new HashMap<String, String>();
	}
	@ConditionalOnMissingBean
	@Bean
	public ArthasAgent arthasAgent(@Autowired Map<String, String> arthasConfigMap,
			@Autowired ArthasProperties arthasProperties) throws Throwable {

因此在 ArthasProperties 里这样子配置是无效的。

@ConfigurationProperties(prefix = "arthas")
public class ArthasProperties {
	/**
	 * disabled commands,default disable stop command
	 */
	private String disabledCommands = "stop";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant