This post demonstrates how to get and set instance variables and invoke methods via the Reflection API using Spring ReflectionTestUtils. There are key reasons to do things via Reflection: 1) test non-public methods (not recommended, though), and 2) inaccessible instance variables (to mock).
WSDL files using cxf-codegen-plugin
There are many ways to generate Java classes from WSDL files – one of them is using the cxf-codegen-plugin, which comes from the Apache Maven CXF. Note that this post will not work with the JDK version beyond 1.8. (See
Validate XML against an XSD that imports other XSDs
This post demonstrates how to validate XML against XSD that imports other XSDs. This is different from validating against multiple independent XSDs.
EJB3.x with JBoss AS 7: Session Beans and the Remote Clients
EJB3.x with JBoss AS 7: Session Beans and the Remote Clients
Getting Familiar With Java TreeSet With Examples
The Java TreeSet is a good choice when our codes, for example, do a lot of frequent read-and-write operations. It is a derivation of a Set, which means it still deals with unique items. Also, it has additional features like
Spring MVC PathVariable Annotation
Sometimes we want to send values to our web application as the path of the URL (or URI) path. For example, /tenants/123 where value 123 represents a tenant Id. To independently access the value in Spring MVC, we use the
Spring Boot JPA – Stored Procedure With Select Statement
Sometimes we need to reuse stored procedures when moving to Spring Boot JPA/ORM because they still serve their purpose. We wouldn’t want to reinvent things but reuse them instead. Although stored procedures traditionally do not return data, we can use
When to use the Java var keyword?
Have you worked on Java 8 for too long that you’ve forgotten about the newer versions of Java? That may still be the case for many projects, but some have already moved to Java 11. Others are also contemplating migrating
Quickly Create a Spring Boot JDBC Application
We can create a Spring Boot application that uses JDBC as quickly as making its JPA variant without hassle. But no doubt, JDBC applications are much faster than those relying on ORM technology. For many, the idea of a JDBC
Quickly Create a Spring Boot JPA Application
Creating a new Spring Boot application that uses JPA is easy, straightforward, and does not involve complex configuration of any kind. You may have worked on other Spring Boot applications which you didn’t develop from scratch. Chances are those applications