@@ -80,17 +80,19 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) {
80
80
if (operationFiled != null ) {
81
81
try {
82
82
actuatorOperation = operationFiled .get (handlerMethod .getBean ());
83
- operationFiled = FieldUtils .getDeclaredField (actuatorOperation .getClass (), OPERATION , true );
84
- AbstractDiscoveredOperation discoveredOperation = (AbstractDiscoveredOperation ) operationFiled .get (actuatorOperation );
85
- OperationMethod operationMethod = discoveredOperation .getOperationMethod ();
86
- if (OperationType .WRITE .equals (operationMethod .getOperationType ())) {
87
- for (OperationParameter operationParameter : operationMethod .getParameters ()) {
88
- Field parameterField = FieldUtils .getDeclaredField (operationParameter .getClass (), PARAMETER , true );
89
- Parameter parameter = (Parameter ) parameterField .get (operationParameter );
90
- Schema <?> schema = AnnotationsUtils .resolveSchemaFromType (parameter .getType (), null , null );
91
- if (parameter .getAnnotation (Selector .class ) == null ) {
92
- operation .setRequestBody (new RequestBody ()
93
- .content (new Content ().addMediaType (org .springframework .http .MediaType .APPLICATION_JSON_VALUE , new MediaType ().schema (schema ))));
83
+ Field actuatorOperationFiled = FieldUtils .getDeclaredField (actuatorOperation .getClass (), OPERATION , true );
84
+ if (actuatorOperationFiled !=null ){
85
+ AbstractDiscoveredOperation discoveredOperation = (AbstractDiscoveredOperation ) actuatorOperationFiled .get (actuatorOperation );
86
+ OperationMethod operationMethod = discoveredOperation .getOperationMethod ();
87
+ if (OperationType .WRITE .equals (operationMethod .getOperationType ())) {
88
+ for (OperationParameter operationParameter : operationMethod .getParameters ()) {
89
+ Field parameterField = FieldUtils .getDeclaredField (operationParameter .getClass (), PARAMETER , true );
90
+ Parameter parameter = (Parameter ) parameterField .get (operationParameter );
91
+ Schema <?> schema = AnnotationsUtils .resolveSchemaFromType (parameter .getType (), null , null );
92
+ if (parameter .getAnnotation (Selector .class ) == null ) {
93
+ operation .setRequestBody (new RequestBody ()
94
+ .content (new Content ().addMediaType (org .springframework .http .MediaType .APPLICATION_JSON_VALUE , new MediaType ().schema (schema ))));
95
+ }
94
96
}
95
97
}
96
98
}
0 commit comments