在 Spring-boot 远程外壳 CRaSH 中,我可以将所有 Spring bean 以 JSON 格式转储到屏幕上:
> beans
[{context=application, parent=null, beans=[{bean=repositoryServer, scope=singleton,
type=com.opentext.tlsPolicyRepository.RepositoryServer$$EnhancerBySpringCGLIB$$841a12c7,
resource=null, dependencies=[]}, {bean=tlsPolicyRepositoryController,
scope=singleton, type=com.opentext.tlsPolicyRepository.TlsPolicyRepositoryController,
resource=file
... ETC
但我找不到过滤该输出的方法:
beans | filter -p bean:repositoryServer
我从内部“手册”页面看到该beans
命令生成 Object 并filter
消耗Map
,因此失败是有道理的。
如何从 CRaSH shell 获取有关单个 bean 的信息?