Generated by All in One SEO v5.0.0.1, this is an llms.txt file, used by LLMs to index the site.All about code ## Sitemaps - [XML Sitemap](https://codingstrain.com/sitemap.xml): Contains all public & indexable URLs for this website. ## Posts - [Posts](https://codingstrain.com/posts-page/) - [Better Avoid Spring Boot Lazy-initialization @PostConstruct Trap](https://codingstrain.com/better-avoid-spring-boot-lazy-initialization-postconstruct-trap/) - Lazy-Initialization. How spring.main.lazy-initialization=true might break your app in ways you won't catch during testing. - [How AI Coding Assistants Are Reshaping Software Engineering Careers](https://codingstrain.com/how-ai-coding-assistants-are-reshaping-software-engineering-careers/) - Lazy-Initialization. Are programmers coding themselves out of a job? The short answer is no. But programming as we know it is fundamentally restructuring. - [How To Handle Large Datasets in Spring Boot](https://codingstrain.com/how-to-handle-large-datasets-with-spring-data-streams/) - Spring Data Streams. In this article, you will learn how do handle large query datasets in Spring Boot by making Spring Data return streams. - [How to Reliably Implement Post-Commit Actions in Spring](https://codingstrain.com/how-to-reliably-implement-post-commit-actions-in-spring/) - Post-Commit Actions. In this article, you will learn how to reliably implement post-commit actions in Spring Boot, avoiding inconsistencies. - [How to Log HTTP Incoming Requests in Spring Boot](https://codingstrain.com/how-to-log-http-incoming-requests-in-spring-boot/) - Post-Commit Actions. In this article, you will learn how to log incoming requests in Spring Boot, through some simple configuration steps. - [How to Do a Breadth First Search for a Graph](https://codingstrain.com/how-to-do-a-breadth-first-search-for-a-graph/) - Breadth First Search. In this article, you will learn how to do a Breadth First Search for a graph, with an example in Java. - [Brief and Easy Explanation of HATEOAS](https://codingstrain.com/brief-and-easy-explanation-of-hateoas/) - HATEOAS. Hypermedia as the Engine of Application State means the server returns not just data but hyperlinks that reveal what the client can do next. - [Brief and Easy Explanation of Virtual Threads](https://codingstrain.com/brief-and-easy-explanation-of-virtual-threads/) - Virtual Threads. Use virtual threads to run 1 million concurrent tasks with plain blocking code, no thread pools, just simple scalability. - [SOLID Principles Through Java Code Examples](https://codingstrain.com/solid-principles-through-java-code-examples/) - SOLID Principles. In this article, we will discuss SOLID Principles. We will use Java examples to clearly explain each of them. - [Java Double: Parse String with Comma](https://codingstrain.com/java-double-parse-string-with-comma/) - Parsing strings into Double values can be tricky sometimes. We show in this post some common scenarios and how to deal with them. - [Java Map: How to Get Sorted Keys](https://codingstrain.com/java-map-how-to-get-sorted-keys/) - The LinkedHashMap class implements the Map interface and preserves the order in which the keys are inserted into it. - [How to Create a Deep or a Shallow Copy in Java](https://codingstrain.com/how-to-create-a-deep-or-a-shallow-copy-of-an-object-in-java/) - In this article, we will discuss the differences between a deep copy and and shallow copy of an object in Java, and their implications. - [How to Implement Prim’s Algorithm for Minimum Spanning Tree](https://codingstrain.com/how-to-implement-prims-algorithm-for-minimum-spanning-tree/) - Prim’s Algorithm. In this article, you will learn how to Implement Prim’s Algorithm for Minimum Spanning Tree, with an example in Java based on backtracking. - [How to Solve the N-Queen Problem](https://codingstrain.com/how-to-solve-the-n-queen-problem/) - N-Queen Problem. In this article, you will learn how to solve N-Queen problem, with an example in Java based on backtracking. - [How to Solve the Matrix Chain Multiplication Problem](https://codingstrain.com/how-to-solve-the-matrix-chain-multiplication-problem/) - Matrix Chain Multiplication. In this article, you will learn how to solve theMatrix Chain Multiplication problem, with an example in Java. - [How to Solve the Coin Change Problem](https://codingstrain.com/how-to-solve-the-coin-change-problem/) - Coin Change Problem. In this article, you will learn how to solve the coin change problem, with an example in Java. - [How to Solve the Longest Common Subsequence Problem](https://codingstrain.com/how-to-solve-the-longest-common-subsequence-problem/) - Longest Common Subsequence. In this article, you will learn how to solve the longest common subsequence problem, with an example in Java. - [How to Implement the Dijkstra's Algorithm](https://codingstrain.com/how-to-implement-the-dijkstras-algorithm/) - Dijkstra's Algorithm. In this article, you will learn how to implement the Dijkstra's Algorithm, with an example in Java. - [How to Implement the Kruskal’s Algorithm](https://codingstrain.com/how-to-implement-the-kruskals-algorithm/) - Kruskal’s Algorithm. In this article, you will learn how to implement the Kruskal’s Algorithm, with an example in Java. - [How to Do a Depth First Search for a Graph](https://codingstrain.com/how-to-do-a-depth-first-search-for-a-graph/) - Depth First Search. In this article, you will learn how to do a Depth First Search for a graph, with an example in Java. - [How to Implement the Edit Distance Algorithm](https://codingstrain.com/how-to-implement-the-edit-distance-algorithm/) - Edit Distance. In this article, you will learn how to implement the Edit Distance Algorithm, with an example in Java. - [Spring Cloud: How to Deal with Microservice Configuration (Part I)](https://codingstrain.com/spring-cloud-how-to-deal-with-microservice-configuration-part-i/) - Microservice Configuration. How to use Spring Cloud Config module to implement a minimal microservice scenario based on remote configuration (part I). - [Spring Boot for Cloud - Actuator](https://codingstrain.com/spring-boot-for-cloud-actuator/) - An overview of Spring Boot framework features that are especially important in the context fo micro-service applications. In this article we discuss features useful in a production environment. - [Spring Boot for Cloud - REST API Development](https://codingstrain.com/spring-boot-for-cloud-rest-api-development/) - An overview of Spring Boot framework features that are especially important in the context of Spring Cloud applications. In this article we discuss features related to API development. - [Spring Boot for Cloud - Configuration and Dependencies](https://codingstrain.com/spring-boot-for-cloud-configuration-dependencies/) - Spring Boot. An overview of Spring Boot framework features that are especially important in the context of Spring Cloud applications. - [A Brief Overview of the Spring Cloud Framework](https://codingstrain.com/spring-cloud-overview/) - A brief overview of the Spring Cloud framework, a list of its main packages and their relation with the Microservice Architectural patterns. - [Spring Cloud: How to Deal with Microservice Configuration (Part II)](https://codingstrain.com/spring-cloud-how-to-deal-with-microservice-configuration-part-ii/) - Microservice Configuration.How to use Spring Cloud Config module to implement a minimal microservice scenario based on remote configuration (part II). - [Spring Cloud: How to Implement Service Discovery (Part I)](https://codingstrain.com/spring-cloud-how-to-implement-service-discovery-part-i/) - Service Discovery.In this article, readers will learn how to configure and run some Service Discovery sample architectures by using the Spring Cloud components. - [Spring Cloud: How to Implement Service Discovery (Part II)](https://codingstrain.com/spring-cloud-how-to-implement-service-discovery-part-ii/) - Service Discovery.In this article, readers will learn some additional topics on Spring Cloud Service Discovery and two different ways in which to combine Service Discovery and Remote Configuration. - [REST Clients with OpenFeign: How to Implement Them](https://codingstrain.com/rest-clients-with-openfeign-how-to-implement-them/) - REST Clients with OpenFeign. In this article, readers will learn how to implement REST clients with the Spring Cloud OpenFeign module. - [How to Implement a Gateway with Spring Cloud](https://codingstrain.com/how-to-implement-a-gateway-with-spring-cloud/) - gateway In this article, you will learn how to implement a gateway component for a micro-service system, by the Spring Cloud Gateway package. - [How to Implement Client-Side Load Balancing With Spring Cloud](https://codingstrain.com/how-to-implement-client-side-load-balancing-with-spring-cloud/) - client-side load balancing. In this article, you will learn how to perform client-side load balancing by Spring Cloud Load Balancer. - [How to Implement Circuit Breaker Pattern With Spring Cloud](https://codingstrain.com/how-to-implement-circuit-breaker-pattern-with-spring-cloud/) - Circuit breaker. In this article, you will learn how to implement a Circuit Breaker feature by Spring Cloud and Resilience4J. - [How to Secure Spring Cloud Applications with SSL Protocol](https://codingstrain.com/how-to-secure-spring-cloud-applications-with-ssl-protocol/) - SSL protocol. In this article, you will learn how to secure micro-service systems by SSL, including disocvery and configuration servers. - [How to Integrate OAuth2 in a Spring Cloud System](https://codingstrain.com/how-to-integrate-oauth2-in-a-spring-cloud-system/) - OAuth2. In this article, you will learn how to secure micro-service systems by OAuth2, using a Keycloak autorization and authentication server. - [How to Implement Message-Driven Services with Spring Cloud Stream](https://codingstrain.com/how-to-implement-message-driven-services-with-spring-cloud-stream/) - Message-driven. In this article, you will learn how to implement message-driven micro-service systems with Spring Cloud Stream. - [How to Implement Observability with Spring Cloud](https://codingstrain.com/how-to-implement-observability-with-spring-cloud/) - Observability. In this article, you will learn how to implement observabilty for micro-service systems with Micrometer and Micrometer Tracing. - [How to Implement Contract Tests with Pact](https://codingstrain.com/how-to-implement-contract-tests-with-pact/) - Pact. In this article, you will learn how to implement contract testing for micro-service systems with Spring-enabled Pact libraries. - [Spring Cloud Contract: How to Implement Contract Tests](https://codingstrain.com/how-to-implement-contract-tests-with-spring-cloud-contract/) - Spring Cloud Contract. In this article, you will learn how to implement contract testing for micro-service systems with Spring Cloud Contract. - [How to Find the Longest Repeating Subsequence in a String](https://codingstrain.com/how-to-find-the-longest-repeating-subsequence-in-a-string/) - Longest Repeating Subsequence. In this article, you will learn how to implement an algorithm to find the longest repeating subsequence in a string, with an example in Java. - [How to Count Number of Distinct Substrings in a String](https://codingstrain.com/how-to-count-number-of-distinct-substrings-in-a-string/) - Number of Distinct Substrings. In this article, you will learn how to implement an algorithm to count the number of distinct dubstrings in a String, with an example in Java. - [How to Implement the KMP (Knuth-Morris-Pratt) Algorithm](https://codingstrain.com/how-to-implement-the-kmp-knuth-morris-pratt-algorithm/) - KMP (Knuth-Morris-Pratt). In this article, you will learn how to implement the KMP (Knuth-Morris-Pratt) algorithm, with an example in Java. - [How to Determine Maximum width of a Binary Tree](https://codingstrain.com/how-to-determine-maximum-width-of-a-binary-tree/) - Maximum width of a Binary Tree. In this article, you will learn how to determine the maximum width of a binary tree, with an example in Java. - [How to Determine if Two Binary Trees are Identical](https://codingstrain.com/how-to-determine-if-two-binary-trees-are-identical/) - Determine if Two Binary Trees are Identical. We will learn how to determine if two binary trees are Identical, with an example in Java. - [How to Survive Microservices Horror](https://codingstrain.com/how-to-survive-microservices-horror/) - Microservices Horror. In this article you will learn how to survive several disastrous scenarios in microservices implementations. - [How to Convert Binary Tree to Doubly Linked List](https://codingstrain.com/how-to-convert-binary-tree-to-doubly-linked-list/) - Level Order Traversal. In this article you will learn how to convert a binary tree to doubly linked list in Java. - [How to Perform Inorder, Non-Recursive Traversal of a Binary Tree](https://codingstrain.com/how-to-perform-inorder-non-recursive-traversal-of-a-binary-tree/) - Non-Recursive Traversal. In this article you will learn how to implement inorder, non-recursive traversal of a binary tree - [How to Determine If a Binary Tree Is a Valid BST in Java](https://codingstrain.com/how-to-determine-if-a-binary-tree-is-a-valid-bst-in-java/) - Valid BST. In this article you will learn how to determine If a binary tree Is a valid BST in Java. - [How to Implement Level Order Traversal in a Binary Tree](https://codingstrain.com/how-to-implement-level-order-traversal-in-a-binary-tree/) - Level Order Traversal. In this article you will learn how to implement the Level Order Traversal of a Binary Tree in Java. - [An Easy to Grasp Explanation of the Tree Data Structure](https://codingstrain.com/an-easy-to-grasp-explanation-of-the-tree-data-structure/) - Tree. In this article you will learn the basics of the Tree Data Structure, and its basic types, such as Binary Search and AVL trees. - [Serialize and Deserialize a Binary Tree: Easy Explanation](https://codingstrain.com/serialize-and-deserialize-a-binary-tree-easy-explanation/) - Serialize and Deserialize a Binary Tree. In this article you will learn how Serialize and Deserialize a Binary Tree with examples in Java. - [Binary Tree's Diameter: Easy Explanation to Find its value](https://codingstrain.com/binary-trees-diameter-easy-explanation-to-find-its-value/) - Binary Tree's Diameter. In this article you will learn how find the diameter of a Binary Tree with an example algorithm in Java. - [An Easy Explanation of the AVL Tree Data Structure](https://codingstrain.com/an-easy-explanation-of-the-avl-tree-data-structure/) - AVL Tree. In this article you will learn about AVL binary search trees and how to implement the related balancing algorithm in Java. - [How to Implement the Lowest Common Ancestor in a Binary Tree Algorithm](https://codingstrain.com/how-to-implement-the-lowest-common-ancestor-in-a-binary-tree-algorithm/) - Lowest Common Ancestor. In this article you will learn how to implement the Lowest Common Ancestor in a Binary Tree algorithm in Java, and for what scenarios is effective. - [How to Implement the Bucket Sort Algorithm](https://codingstrain.com/how-to-implement-the-bucket-sort-algorithm/) - Bucket Sort. In this article you will learn how to implement the Bucket Sort algorithm in Java, and for what scenarios is effective. - [How to Implement the Shell Sort Algorithm](https://codingstrain.com/how-to-implement-the-shell-sort-algorithm/) - Shell Sort. In this article you will learn how to implement the Shell Sort algorithm in Java, and for what scenarios is effective. - [How to Implement the Insertion Sort Algorithm](https://codingstrain.com/how-to-implement-the-insertion-sort-algorithm/) - Insertion Sort. In this article you will learn how to implement the Insertion Sort algorithm in Java, and for what scenarios is effective. - [How to Implement the Counting Sort Algorithm](https://codingstrain.com/how-to-implement-the-counting-sort-algorithm/) - Counting Sort. In this article you will learn how to implement the Counting Sort algorithm in Java, and for what scenarios is effective. - [How to Implement the Bubble Sort Algorithm](https://codingstrain.com/how-to-implement-the-bubble-sort-algorithm/) - Bubble Sort. In this article you will learn how to implement the Bubble Sort algorithm in Java, and for what scenarios is effective. - [How to Implement the Radix Sort Algorithm](https://codingstrain.com/how-to-implement-the-radix-sort-algorithm/) - Radix Sort. In this article you will learn how to implement the Radix Sort algorithm in Java, and for what scenarios is effective. - [How to Reverse a String](https://codingstrain.com/how-to-reverse-a-string/) - In this article, we will discuss how to reverse a String in Java, using two different approaches, improving the space efficiency in the second solution. - [How to Reverse a String Keeping Special Characters in Place](https://codingstrain.com/how-to-reverse-a-string-keeping-special-characters/) - keeping special characters In this article, we will discuss how to reverse a String containing special characters in Java, keeping the their original positions. - [How to Find the Missing Number From an Array of Integers](https://codingstrain.com/find-missing-number-from-suquence-of_integers/) - find the missing number In this article, the readers will learn two possible ways of finding the missing numbers from a set of n-1 numbers taken from a 1-n sequence. - [How to Do a Binary Search on a Sorted Array](https://codingstrain.com/how-to-do-a-binary-search-on-a-sorted-array/) - binary search In this article, the readers will learn two possible ways of finding the missing numbers from a set of n-1 numbers taken from a 1-n sequence. - [How to Get All Permutations of a String](https://codingstrain.com/how-to-get-all-permutations-of-a-string/) - permutations of a string In this article, the readers will learn how to find all the permutations of a given string of characters. - [How to Solve the 0/1 Knapsack Problem](https://codingstrain.com/how-to-solve-the-0-1-knapsack-problem/) - 0/1 knapsack problem In this article, the readers will learn how to solve the 0/1 knapsack problem, by a dynamic algorithm. - [Quick-Sort Algorithm: How to Sort an Array](https://codingstrain.com/quick-sort-algorithm-how-to-sort-an-array/) - quick-sort algorithm In this article, the readers will learn how to sort an array of integers using the quick.sort algorithm - [How to Solve the Fractional Knapsack Problem](https://codingstrain.com/how-to-solve-the-fractional-knapsack-problem/) - fractional knapsack problem In this article, the readers will learn how to solve the fractional knapsack problem, by a greedy algorithm. - [How to Check if a Number is Sparse](https://codingstrain.com/how-to-check-if-a-number-is-sparse/) - check if a number is sparse In this article, the readers will learn how to check if an integer number is sparse. - [Nth Smallest Element in an Unsorted Array](https://codingstrain.com/nth-smallest-element-in-an-unsorted-array/) - Nth Smallest Element. In this article you will learn severale ways of solving the "Finding the Nth smallest element in an unsorted array" problem. - [How to Implement the QuickSelect Algorithm](https://codingstrain.com/how-to-implement-the-quickselect-algorithm/) - QuickSelect. In this article you will learn how to implement the QuickSelect algorithm in Java. - [How to Implement the Merge Sort Algorithm](https://codingstrain.com/how-to-implement-the-merge-sort-algorithm/) - Merge Sort. In this article you will learn how to implement the Merge Sort algorithm in Java. - [How to Implement the Heap Sort Algorithm](https://codingstrain.com/how-to-implement-the-heap-sort-algorithm/) - Heap Sort. In this article you will learn how to implement the Heap Sort algorithm in Java, and for what scenarios is effective. - [How to Set Custom Colors with Apache POI-HSSF](https://codingstrain.com/how-to-set-custom-colors-with-apache-poi-hssf/) - Apache POI-HSSF. In this article, the readers will learn how set custom background Excel cell colors with Apache POI-HSSF. - [Java Map: How to Preserve Insertion Order](https://codingstrain.com/java-map-preserve-insertion-order/) - The LinkedHashMap class implements the Map interface and preserves the order in which the keys are inserted into it. - [How to Better Understand Java HashMap](https://codingstrain.com/how-to-better-understand-java-hashmap/) - Java HashMap. How the HashMap class is internally implemented, its initial capacity and re-sizing and its behavior in a multi-threaded scenario. - [A Quick Explanation of The Java Decorator Pattern](https://codingstrain.com/quick-explanation-of-the-java-decorator-pattern/) - A brief overview of the Java Decorator Pattern, a design clever gimmick used to extend existing software in a dynamic way. - [Java Observer Pattern with Spring and AOP](https://codingstrain.com/java-observer-pattern-spring-aop-and-a-custom-annotation/) - The Java Observer Pattern is among the most famous design patterns, aimed at handling communication of state changes between objects. ## Pages - [Homepage](https://codingstrain.com/) - [My AI Account](https://codingstrain.com/myai-account/) - [wpaicg_my_account] - [Block Content Examples](https://codingstrain.com/block-content-examples/) - Below are examples of column classes that are available in the block editor. Two Columns This is an example of a WordPress post, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many posts as you like in order to - [About Us](https://codingstrain.com/about-us/) - Hello! We are StudioPress, and we build themes with an emphasis on typography, white space, and mobile-optimized design to make your website look absolutely breathtaking. Contact Us 555.555.5555 1234 Block Blvd.San Francisco, CA 94120 - [Contact Us](https://codingstrain.com/contact-us/) - [Landing Page](https://codingstrain.com/landing-page/) - This is an example of a WordPress post, you could edit this to put information about yourself so readers know where you are coming from. You can create as many posts as you like in order to share with them what is on your mind. “There are only two places in the world where we - [Sample Page](https://codingstrain.com/sample-page/) - This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I'm a bike messenger ## Categories - [Spring Cloud](https://codingstrain.com/category/java/spring/spring-cloud/) - [Design Patterns](https://codingstrain.com/category/design-patterns/) - [Java Miscellaneous Tips](https://codingstrain.com/category/java-miscellaneous-tips/) - [Featured](https://codingstrain.com/category/featured/) - [Spotlight](https://codingstrain.com/category/spotlight/) - [Explore](https://codingstrain.com/category/explore/) - [Java](https://codingstrain.com/category/java/) - [Spring](https://codingstrain.com/category/java/spring/) - [Spring Boot](https://codingstrain.com/category/java/spring/spring-boot/) - [Data Structures and Algorithms](https://codingstrain.com/category/data-structures-and-algorithms/) - Data Structures and Algorithms - [Algorithms](https://codingstrain.com/category/data-structures-and-algorithms/algorithms/) - Algorithms - [Data Structures](https://codingstrain.com/category/data-structures-and-algorithms/data-structures/) - Data Structures - [Apache POI](https://codingstrain.com/category/java/apache-poi/) - [Thoughts and Stories](https://codingstrain.com/category/thoughts-and-stories/) - [AI](https://codingstrain.com/category/ai/) - Artificial Intelligence ## Tags - [Java](https://codingstrain.com/tag/java/) - [Spring Boot](https://codingstrain.com/tag/spring-boot/) - [Spring Cloud](https://codingstrain.com/tag/spring-cloud/) - [Apache POI](https://codingstrain.com/tag/apache-poi/) - [HSSF](https://codingstrain.com/tag/hssf/) - [Algorithms](https://codingstrain.com/tag/algorithms/) - [Sorting](https://codingstrain.com/tag/sorting/) - [Trees](https://codingstrain.com/tag/trees/) - [Date Structures](https://codingstrain.com/tag/date-structures/) - [real life](https://codingstrain.com/tag/real-life/) - [engineering](https://codingstrain.com/tag/engineering/) - [Horror Stories](https://codingstrain.com/tag/horror-stories/) - [Strings](https://codingstrain.com/tag/strings/) - [Graphs](https://codingstrain.com/tag/graphs/) - [Dynamic Programming](https://codingstrain.com/tag/dynamic-programming/) - [Backtracking](https://codingstrain.com/tag/backtracking/) - [Greedy](https://codingstrain.com/tag/greedy/) - [Java tips](https://codingstrain.com/tag/java-tips/) - [Java Principles](https://codingstrain.com/tag/java-principles/) - [Java New Features](https://codingstrain.com/tag/java-new-features/) - [AI](https://codingstrain.com/tag/ai/)