Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
com.figtreelake:cor-bean-processor-spring-boot-starter
Advanced tools
A Spring Boot starter to help creating the chain of responsibility (COR) bean processor.
TL;DR: You focus on the logic while we handle the chain!
COR Bean Processor is a library to assist creating Chain Of Responsibility design patterns on Spring Boot projects. It automatically chain all links together, reducing the amount of non-business code required in the project.
Be sure to add Spring Boot to your project.
Add COR Bean Processor Spring Boot Starter on your project.
pom.xml
file
under <dependencies>
tag.<dependency>
<groupId>com.figtreelake</groupId>
<artifactId>cor-bean-processor-spring-boot-starter</artifactId>
<version>1.0</version>
</dependency>
build.gradle
file
under dependencies
declaration.implementation 'com.figtreelake:cor-bean-processor-spring-boot-starter:1.0'
Make your Chain Of Responsibility link classes implement ChainLink interface.
Add a ChainLink interface field on the class where ou need your chain and annotate it with either @Autowired or @Inject (if you are using Javax Inject)
That is it! COR Bean Processor will automatically create the chain and Spring Boot will inject its first list into the target class.
If you need further details about implementation, feel free to check the examples repository.
Q: Does COR Bean Processor handles multiple chains?
A: Yes! As long as each ChainLink implementation declares a different type on its template, the library will concatenate each link group separately. For more details about it check multiple chains project inside the example repository.
Q: What if my links must be concatenated in a specific order?
A: You can annotate your links with @Order. The library will respect the specification and chain links in the defined order. For more details check ordered links inside the example repository.
Q: I need one link to be the first of my chain. Do I need to add @Order annotation on all my links?
A: No. Just add @Primary annotation on your first link and the library will use it as the first chain element. For more details check chain with primary link example.
Try out the library. If you like the outcome, give a star for its repository, share or talk about it with your IT friends and colleagues. This is a work I have been doing in my spare time and I really would like to see that people appreciate the time I have invested on it.
If you liked the project and really want to demonstrate your appreciation, you can send me a "thank you" coffee. 🙂
This library was implemented after reading Spring Boot - Auto Configuration and Spring Boot Features - Developing Auto Configuration documentation sections.
Also, thanks to Stéphane Nicoll and his spring-boot-master-auto-configuration repository which helped me understand the minor details necessary to create a Spring starter library.
FAQs
A Spring Boot starter to help creating the chain of responsibility (COR) bean processor.
We found that com.figtreelake:cor-bean-processor-spring-boot-starter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.