The ones you mentioned, apparently Stella-boleto is the most used today, even by other utilities of Caelum-Stella, like the Stella-bean-validation. Looking at the repository of Stella-boleto the last change is 16 days ago, and bopepo, 14 days ago.
Today I use the Stella-boleto. It actually has far fewer banks implemented than the bopepo (supports 13 more banks at the moment). I never used bopepo, so I can’t talk much about the project.
In the Stella-boleto, until then did not need to implement for a new bank, the current (BB, Bradesco, CEF, HSBC, Itaú, Santander and Safra) meet me, but it is not very difficult to implement a new.
Basically you must extend from the abstract class AbstractBanco
and implement the interface Bench, doing the following:
- implement methods that are not implemented in
AbstractBanco
, with geraCodigoDeBarrasPara
(This is where you should consider portfolios if the bank has more than one), getNossoNumeroFormatado
, getNumeroFormatadoComDigito
, etc..
- if the check digit generation is different from the standard, implement the interface
GeradorDeDigito
or extend GeradorDeDigitoPadrao
and overwrite getGeradorDeDigito()
.
Other interesting points of these two projects are:
- both are under the Apache V2 License, so you can make a Fork projects and follow their own path;
- both are on github, so you can also make a Fork and adjust what you need (how to implement the billet you need) and make a pull request. Meets your requirement and collaborates with the community as well.
Jboleto, as well noted @Victorstafusa, is discontinued a long time ago, about 5 years ago I did a test with him with a development team and well, he had a kind of messy design and macaroni code =D
Other solutions, if you do not want to adopt these, is to integrate with some third party, such as Copper Free, Boleto Bancário, etc..
That said, I would (and will) go from Stella-boleto even, by the simplicity of use and extension (even without having specific documentation of the framework, you will have to read code to learn the structure, which incidentally is very simple). It may be interesting to test both and if more specific questions arise, include them here.
Amazing how something so important this without support by the community.
– alexjosesilva
Look for someone to help you set up a Gradlew project and I couldn’t find !
– alexjosesilva