Best of Foojay.ioAugust 2024

  1. 1
    Article
    Avatar of foojayioFoojay.io·2y

    Interview with a Java Champion: Reflections on a Storied Career and Insights for the Next Generation

    A seasoned developer with over two decades of experience, Ben Evans shares his journey from first learning Java in 1998 to becoming deeply involved in the Java community. He reflects on the evolution of Java, the importance of community, and the challenges new developers face today. Ben also provides insights into the process of writing and revising technical books, highlighting the continuous changes in software trends and the enduring relevance of fundamental skills.

  2. 2
    Article
    Avatar of foojayioFoojay.io·2y

    Spring: Internals of @ComponentScan

    The @ComponentScan annotation in Spring, located within the org.springframework.context.annotation package, helps automatically detect beans in a Spring application. It can identify classes annotated with stereotypes like @Configuration, @Component, @Service, @Controller, and @Repository. The annotation can be used with or without parameters, such as basePackageClasses() or basePackages(), to specify scanning packages. It essentially replaces the XML tag <context:component-scan/> and includes various attributes for customizing the component scanning process, like nameGenerator, scopeResolver, scopedProxy, useDefaultFilters, includeFilters, and excludeFilters.

  3. 3
    Article
    Avatar of foojayioFoojay.io·2y

    Allocation Profiling in Java

    Learn how to use allocation profiling to solve a runtime issue in a Java application. The post guides through cloning a GitHub repository, running the application, and diagnosing an OutOfMemoryError. It details steps for using debuggers, monitoring CPU and memory usage, and employing allocation profiling to identify memory leaks. Finally, it covers fixing code by implementing missing equals() and hashcode() methods, ensuring the application runs smoothly.