While learning how to configure RestTemplate, I find there are many things to config, and I lack brief understanding of RestTemplate. After searching and reading, I wrote this article to summary the things I learned to help me remember them. RestTemplate Configuration Outline Usually, RestTemplate need to config its HTTP
In this article, I will show you how ANTLR handles errors by default and how to write your own ANTLR error listener, and all the code involved is in this repo. ANTLR Default Error Behavior ANTLR has great error reporting and error recovery abilities. By default, it would only print
I will show you a simple calculator example built with ANTLR and Java to help you understand basic concepts and rules of ANTLR. All the code shown below is in this repo ANTLR ANTLR(ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating
* Open Source Society University(OSSU): use free online materials to wire up the path to self-taught computer science education. It not only just put together courses, it designs the curriculum and provide online learning community through chat group. * Online CS courses list from Class Central: Class Central aggregates courses from
TransactionSynchronization is an interface that enable us to add callbacks for transaction synchronization, such as send message after a successful commit. You can view official information here. I will show the way to use TransactionSynchronization in the following example: By operation defined in afterCommit, after the transaction successfully commit the
If your Java project has a private Maven repository, or you have multiple Maven repositories, you need to additionally set up the repository info, otherwise you won't successfully get the dependencies or plugins, and see the following error message: Could not find artifact xxxx in central(https://repo.maven.apache.
Override method getAsyncUncaughtExceptionHandler in AsyncConfigurer could custom exception handling for @Async. Source: @Async Exception handling Spring Boot