Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
71ebcbff
Commit
71ebcbff
authored
Dec 09, 2013
by
Dave Syer
Committed by
Phillip Webb
Dec 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add beans and autoconfig reports to shell
parent
64438000
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
autoconfig.groovy
...emote/src/main/resources/commands/crash/autoconfig.groovy
+29
-0
beans.groovy
...ell-remote/src/main/resources/commands/crash/beans.groovy
+17
-0
No files found.
spring-boot-starters/spring-boot-starter-shell-remote/src/main/resources/commands/crash/autoconfig.groovy
0 → 100644
View file @
71ebcbff
package
commands
import
org.springframework.boot.actuate.endpoint.AutoConfigurationReportEndpoint
class
autoconfig
{
@Usage
(
"Display auto configuration report from ApplicationContext"
)
@Command
void
main
(
InvocationContext
context
)
{
context
.
attributes
[
'spring.beanfactory'
].
getBeansOfType
(
AutoConfigurationReportEndpoint
.
class
).
each
{
name
,
endpoint
->
def
report
=
endpoint
.
invoke
()
out
.
println
"Endpoint: "
+
name
+
"\n\nPositive Matches:\n================\n"
report
.
positiveMatches
.
each
{
key
,
list
->
out
.
println
key
+
":"
list
.
each
{
mandc
->
out
.
println
" "
+
mandc
.
condition
+
": "
+
mandc
.
message
}
}
out
.
println
"\nNegative Matches\n================\n"
report
.
negativeMatches
.
each
{
key
,
list
->
out
.
println
key
+
":"
list
.
each
{
mandc
->
out
.
println
" "
+
mandc
.
condition
+
": "
+
mandc
.
message
}
}
}
}
}
\ No newline at end of file
spring-boot-starters/spring-boot-starter-shell-remote/src/main/resources/commands/crash/beans.groovy
0 → 100644
View file @
71ebcbff
package
commands
import
org.springframework.boot.actuate.endpoint.BeansEndpoint
class
beans
{
@Usage
(
"Display beans in ApplicationContext"
)
@Command
def
main
(
InvocationContext
context
)
{
def
result
=
[:]
context
.
attributes
[
'spring.beanfactory'
].
getBeansOfType
(
BeansEndpoint
.
class
).
each
{
name
,
endpoint
->
result
.
put
(
name
,
endpoint
.
invoke
())
}
result
.
size
()
==
1
?
result
.
values
()[
0
]
:
result
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment