hybris Beans command-line tool + web API
Overview
This tool is a part of my hybris Runtime Developer tools package. It allows showing one-page all-in-one information about hybris beans using the command line interface.Features
- REST API and console tool with the common configuration,
- Shows the information about the specific bean,
- Changing bean values (!) on the fly.
Using
Command-line interface
The command-line app is a console wrapper for API. See API for the details. Usage: Change the value property of bean to value./hybrisBeans.sh -b bean -n property -v valueShow all hybris beans:
./hybrisBeans.sh
Parameters
parameter | Description | Example |
–? | help, available options. Only for the console version. | |
bean (-b) | Shows/update the bean information | bean=myProductRaoPopulator |
propertyname (-n) | name of the bean to change | propertyname=categoryService |
propertyvalue (-v) | new value of the bean | propertyvalue=<defaultCategoryService> propertyvalue=13 |
#bash hybrisBeans.sh -b myProductRaoPopulator -n categoryService -v "<defaultCategoryService>"You can see the list of bean methods here:
#bash hybrisBeans.sh -b indexerService
API
curl "https://electronics.local:9002/tools/beans/bean/myProductRaoPopulator?propertyName=categoryConverter&propertyValue=<defaultCategoryRaoConverter>" -k 2>/dev/null
Video
Limitations
- You can change the value of the bean property only if the bean has a setter for this property. For example, bean “multipartResolver” (org.springframework.web.multipart.commons.CommonsMultipartResolver) has a roperty named maxUploadSize that cannot be changed using my utility because the class from Spring doesn’t have a setter.
- The current implementation supports properties of two types: Strings and References. Properties of List or Map types are not supported yet.
- Sometimes bean classes use parameters only at the first load. You will be able to change the values of the parameters but the initial value will be used anyway.
Download
The extension is available by request. E-mail: Rauf_Aliev@epam.com. Skype: rauf_aliev© Rauf Aliev, August 2016
boufnichelmed
20 September 2016 at 06:55
Great work !