Generate Boleto in Java

3

I stuck here looking at some libs for boleto bancário generation and it seems that the majority was abandoned. I would like to know if there is any updated, better or easy to customize.

Libs parsed:

Bopepo - link

stella-ticket - link

Of the two, the Bopepo documentation is more complete, but there are some banks that do not work. The forum has over 1 year that has no post.

The stella-boleto has only a few banks. And I have not seen example or documentation to implement a new one.

My question is: Are there other similar open source projects that are active?

    
asked by anonymous 15.05.2015 / 14:47

2 answers

4

Of what you have quoted, apparently the stella-boleto is the most commonly used today, even by other caelum-stella , such as the stella-bean-validation . Looking at the repository for the stella-boleto the last change is 16 days ago, and bopepo , from 14 days ago.

Today I use the stella-boleto . Actually it has far fewer banks implemented than bopepo (it supports 13 more banks at the moment). I've never used bopepo , so I can not really say much about the project.

In the stella-boleto , until then I did not need to implement for a new bank, the current ones (BB, Bradesco, CEF , HSBC, Itaú, Santander and Safra), but it is not very difficult to implement a new one.

You should basically extend the abstract class AbstractBanco and implement the interface Bank , by doing the following:

  • implement methods that are not implemented in AbstractBanco , with geraCodigoDeBarrasPara (here you should consider the portfolios if the database has more than one), getNossoNumeroFormatado , getNumeroFormatadoComDigito , etc. >
  • If the check digit generation is different from the default, implement the 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 do a fork of projects and follow your own path;
  • Both are in github, so you can also do a fork and adjust what you need (how to implement the ticket you need) and pull pull request . It meets your requirement and cooperates with the community as well.

JBoleto, as well noted @VictorStafusa, has been discontinued for a long time, 5 years ago I did a test with it with a development team and well, it had a messy design and code = p>

Other solutions, if you do not want to adopt these, is to integrate with some third party, such as Free Copper , Banking Ticket , etc.

That said, I would (and will) stella-boleto even for the simplicity of use and extension (even not having documentation specific to the framework , you will have to read code to learn the structure, which is quite simple). It might be interesting for you to test both and if more specific questions arise, include them here.

    
05.07.2015 / 16:53
0

Try jBoleto

I have already worked with jBoleto and it was simple to use, an accredit which may be a good candidate for your application. In the case, I think the most active is the same Stella, that is with greater community and "buzz"

link

    
05.07.2015 / 05:22