Spring @PostConstruct and @PreDestroy alternatives in Java 9+

Both @PostConstruct and @PreDestroy annotations (often used in spring applications) are located in java.xml.ws.annotation package which is a part of  Java EE module. J2EE has been deprecated in Java 9 and it’s scheduled to be removed in Java 11. Let’s look how to run your application without errors again in two approaches: with and without code modification.

(more…)

Continue Reading

Spring – How to Autowire bean in a static class

There are situations in witch you need to access Spring ApplicationContext or any other Spring bean from a static method.

(more…)

Continue Reading

Spring Boot & Gradle – Project Setup

This guide shows you how to setup Spring Boot project using Gradle, and how to create the Hello World application.

(more…)

Continue Reading

End of content

No more pages to load

Close Menu