Modify the method signature of the overriden method to make calling codes not to handle or declare the exception coming from that method.
Using Spring Autowired in Kotlin
This post shows an example of how to use @Autowired to inject @Service object in @Controller object Kotlin.
Specify Non-default PostgreSQL Schema When Connecting Using JDBC
By default, we use the public schema when we connect to PostgreSQL. Some applications use multiple schemas to store data in the database. Therefore, they need to specify explicitly which PostgreSQL schemas to use. This post shows how to connect
JSqlServerBulkInsert with Spring JDBC Connection is Closed
When we use JSqlServerBulkInsert, we provide a database connection from the pool to bulk insert data even in Spring JDBC. As a result, it might not work well with Spring. Either we could get “Connection is Closed” errors or cause
(Bad Practice) Wait Until All Threads Complete Execution in Java
This post shows an example of a bad practice I saw in one of my Java projects seven years ago. It also has a naive implementation of concurrency in Java, wherein it waits for all threads to complete. Moreover, it
Very Slow XML Validation against XSDs with unique and key elements
This post shows that XML XSD validation with <xs:unique> is very slow, especially for a huge list of elements, e.g., 300,000 items. We are better off ensuring distinct values through Java codes. The problem also applies to <xs:key>. Worse, we can
Get First And Last Dates Of Current Quarter Using Joda Time
This post shows how to come up with the first and last dates of the current quarter using Joda time. Although we can do it in Java 8 and above using the Time API, Joda Time is an alternative. Joda
Using @Conditional with @Configuration in Spring
Using @Conditional with @Configuration in Spring allows us to group @Bean objects loaded on a specific condition without resorting to using @Profile and too many @Bean/@Conditional. Requirements We used the following items for this post. Spring Boot 2.0.4.RELEASE JDK 8
JAXB Pre And Post-processing with Unmarshaller Listener
This post shows how to perform JAXB pre and post-processing with Unmarshaller Listener. For instance, you may want to compare the contents of an object before and after you unmarshal an XML. Another use-case is when you may need to
Installing Java 2 SDK 1.4 in Windows 7
This post shows how to install Java 2 SDK 1.4 in Windows 7. If you’ve worked in IT consulting for some time, you will realize that some clients may still be using older versions of Java. Although this version of