Best of JavaJune 2024

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

    Be a Better Java Developer: 19 Tips for Staying Ahead in 2024

    Tips for becoming a better Java developer, including upgrading Java versions, learning Kotlin, exploring other languages/frameworks, and staying updated with the Java community.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    10 Spring Boot Performance Best Practices

    Spring Boot, a popular framework in the Java ecosystem, simplifies application development but sometimes needs optimization for performance. Key practices to enhance performance include using the latest versions of Spring Boot and JVM, enabling virtual threads, leveraging Spring AOT with GraalVM Native Image for faster startup times and reduced memory usage, and employing JVM features like Checkpoint Restore and Class Data Sharing. Configuring threads efficiently for both MVC and database access layers, using effective caching strategies, adopting resiliency patterns like circuit breakers, and incorporating thorough monitoring and profiling are also critical. Tools like Digma can further help by providing performance insights during development.

  3. 3
    Article
    Avatar of hnHacker News·2y

    piku/piku: The tiniest PaaS you've ever seen. Piku allows you to do git push deployments to your own servers.

    piku is a micro-PaaS that allows you to do git push deployments to your own servers. It supports multiple languages and can run on low-end devices.

  4. 4
    Article
    Avatar of communityCommunity Picks·2y

    What's Your Go-To Java Framework

    Choosing the right Java framework is crucial for project success. This post discusses preferred frameworks like Quarkus and Spring Boot, highlighting the advantages of using Java 21 with features like virtual threads. It also explores tools like Maven and PostgreSQL, emphasizing their benefits for developers. Observability tools like Digma and OpenTelemetry for Quarkus are also covered, demonstrating their importance in monitoring and improving application performance.

  5. 5
    Article
    Avatar of justjavaJust Java·2y

    Poll: What Version of Java Are You Using?

    A poll is being conducted to understand the usage of different Java versions among developers. Participants can vote on their current Java version and share why they might still be using older versions like Java 8 in the comments.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    A list of major Java and JVM features since JDK 17 to 22

    An overview of major Java and JVM features from JDK 17 to 22, including sealed classes, pattern matching enhancements, and the Foreign Function and Memory API.

  7. 7
    Article
    Avatar of java_libhuntAwesome Java Newsletter·2y

    Why are my JAVA virtual threads slower than the platform threads?

    Exploring the performance differences between Java virtual threads and platform threads, the post highlights how virtual threads can enhance service performance by avoiding idle time during I/O operations. It covers enabling virtual threads in Spring Boot, building a test API for comparison, and performance comparisons using Apache HTTP server benchmarking. The author identifies pinning as the reason for unexpected slowdowns and concludes with strategies for overcoming limitations using MySQL Connector/J.

  8. 8
    Article
    Avatar of baeldungBaeldung·2y

    HTTP Request and Response Logging Using Logbook in Spring

    Logbook is an extensible Java library that enables complete request and response logging for various technologies. By adding a Logbook Maven dependency and configuring logback-spring.xml and application.properties files, HTTP requests and responses can be logged in a Spring Boot application. The library supports filtering and formatting logs, and provides different sinks like the ChunkingSink and LogstashLogbackSink for advanced logging needs. Custom sink implementations and JSON formatting are also possible.

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

    Java: Functional Programming f(x) – Part2

    This post discusses the important features of functional programming in Java, including lambda expressions, method references, functional interfaces, and the streams API. It highlights the significance of lambda expressions in simplifying code and provides examples of their usage.

  10. 10
    Article
    Avatar of javarevisitedJavarevisited·2y

    Sealed classes and interfaces in Java

    Sealed classes and interfaces in Java allow developers to control which classes can extend or implement them, providing a more structured and secure approach to class hierarchies.

  11. 11
    Article
    Avatar of baeldungBaeldung·2y

    The Difference Between JUnit and Mockito

    This post explores the differences between JUnit and Mockito, two popular testing frameworks in the Java ecosystem. JUnit is focused on creating the testing structure and environment, while Mockito complements JUnit by helping test individual components through mocking and controlling their behavior.

  12. 12
    Article
    Avatar of reflectoringReflectoring·2y

    Getting started with Spring Security and JWT

    Spring Security offers robust security features for Java applications, including session management, authentication, and protection against common threats like CSRF. This guide covers the implementation of JWT (JSON Web Token) for secure communication between two parties. JWTs are versatile and can be used for single sign-on, API authentication, stateless sessions, and microservices. It covers the creation, structure, common use cases, and potential drawbacks of JWTs, as well as a step-by-step guide to implement JWT for authentication in a Spring Boot application.

  13. 13
    Article
    Avatar of inside_javaInside Java·2y

    Java SE Spring 2024 Roadmap Update

    Oracle Java 11 receives extended support until at least January 2032. Oracle may extend the commercial support timeframe for Java LTS releases. Commercial support for JavaFX on JDK 8 will end in March 2025.

  14. 14
    Article
    Avatar of baeldungBaeldung·2y

    Java Weekly, Issue 548

    The issue covers topics including getting started with Jakarta Data and Hibernate, simplifying Java with module import declarations in JDK 23, and mapping Java Enum to custom values with JPA and Hibernate. Also features guides on securing Jakarta EE applications with OIDC and Keycloak, and insights into Kubernetes debugging. Various Spring and Java updates are highlighted alongside technical musings and thought-provoking reads.

  15. 15
    Article
    Avatar of baeldungBaeldung·2y

    Using Enum in Spring Data JPA Queries

    Learn how to query enum fields in entity classes using Spring Data JPA. Explore standard JPA methods and native queries for querying enum fields.

  16. 16
    Article
    Avatar of jrebelJRebel·2y

    What Are Threads and Fibers in Java?

    Threads and fibers in Java have distinct use cases and performance considerations. Virtual threads became a permanent feature in the JDK with Java 21. Quasar fibers are lightweight threads for concurrent programming in Java.

  17. 17
    Article
    Avatar of vaadinVaadin·2y

    Building AI-Powered Java Applications

    Java developers are keen on integrating AI into their applications but often find it challenging due to time constraints and the steep learning curve. Enterprise applications benefit greatly from AI, as it can automate complex workflows. To help developers, the author created two application starters: a RAG-based business context-aware chatbot and a sentiment analysis tool for customer feedback, both built with Flow, LangChain4j, and Spring Boot. Ideas for further AI applications are welcomed.

  18. 18
    Article
    Avatar of grafanaGrafana Labs·2y

    Java observability with OpenTelemetry, Grafana Cloud, and Digma.ai

    Modern observability tools like OpenTelemetry and platforms such as Grafana Cloud are making it easier for developers to proactively monitor their application's performance. By integrating these tools with specialized solutions like Digma.ai, developers can shorten the feedback loop, identifying and addressing issues more swiftly. The post describes how to connect a Spring Boot application to Grafana Cloud and configure Digma.ai for continuous feedback within the IDE, enhancing the development lifecycle with runtime code analysis.

  19. 19
    Video
    Avatar of communityCommunity Picks·2y

    Efficient containers with Spring Boot 3, Java 21 and CDS by Sébastien Deleuze @ Spring I/O 2024

    Sébastien Deleuze explains how to enhance runtime efficiency in Spring Boot applications using Spring Boot 3, Java 21, and Class Data Sharing (CDS). Key focuses include minimizing startup time, reducing memory consumption, and optimizing container deployments. Deleuze introduces features such as native image support, ahead-of-time (AOT) optimizations, and virtual threads, which collectively improve application performance and scalability. He also highlights improvements in developer experience with Spring Boot 3.1 and the integration of CDS in Spring Boot 3.3, demonstrating practical steps and benchmarking results to showcase these optimizations.

  20. 20
    Article
    Avatar of javarevisitedJavarevisited·2y

    WSLing Spring Boot with IDEA

    Developing Spring Boot applications on Windows can be challenging, but upgrading to IntelliJ IDEA 2024.1.3 has significantly improved the experience. The post provides a comprehensive guide on setting up a self-contained WSL environment for Java development, installing IntelliJ IDEA on Windows, and configuring it to work seamlessly with WSL. The post also compares WSL with Dev Containers, highlighting the space and memory usage considerations for an optimized development setup.

  21. 21
    Article
    Avatar of baeldungBaeldung·2y

    @Valid Annotation on Child Objects

    Learn how to use the @Valid annotation to validate nested child objects in Spring Boot.

  22. 22
    Article
    Avatar of javarevisitedJavarevisited·2y

    How to collect a Java Stream into a primitive Collection

    Discover how to collect a Java Stream into a primitive Collection to avoid boxing. Learn about the options available for transforming a primitive Stream and the usage of Eclipse Collections to bridge Java Stream and primitive collections.

  23. 23
    Article
    Avatar of infoworldInfoWorld·2y

    HTMX for Java with Spring Boot and Thymeleaf

    HTMX enhances HTML with capabilities like Ajax and DOM swaps, simplifying web development. This post showcases building a Todo app using Java with Spring Boot and Thymeleaf, minimizing JavaScript use. It explains creating model and controller classes, utilizing Thymeleaf templates, and handling CSS styling to achieve a robust and interactive application.

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

    Hack a Java application with the debugger

    Learn how to debug and hack a Java application using the debugger. Explore the concept of 'god mode' in gaming and how it can be applied.

  25. 25
    Article
    Avatar of neo4jneo4j·2y

    GenAI Starter Kit: Build an Application with Spring AI in Java

    Learn how to build a GenAI application with Spring AI in Java using the Spring AI starter kit project. Explore the features of Spring AI and its integration with Neo4j for storing and querying vectors.