Learn how to use environment variables in Spring Boot’s application.properties.
Search Results for: var
Differences Between set() and lazySet() in Java Atomic Variables
Learn the differences between set() and lazySet() methods of atomic classes in Java and understand when to use which method.
Swap Two Variables in Java
Learn how to swap two variables in Java, depending on the type of the variables.
Java Error “variable might not have been initialized”
How to solve “variable might not have been initialized” in Java.
Volatile Variables and Thread Safety
Learn why declaring a shared variable as volatile does not always guarantee thread-safety.
Declaring Val and Var Variables in Lombok
Learn how to use Lombok’s val and var to define local variables without specifying the type.
Environment Variable Prefixes in Spring Boot 2.5
Learn how to use a prefix for environment variables with Spring Boot.
Spring RestTemplate Exception: “Not enough variables available to expand”
Learn about Spring’s RestTemplate Not enough variables available to expand IllegalArgumentException.
Thymeleaf Variables
Learn how to define and use variables in Thymeleaf
Spring @PathVariable Annotation
When we need to extract values from the request URI, @PathVariable is the way to go. Let’s look how to use it.
When Are Static Variables Initialized in Java?
Learn about the static variable initialization in Java.
Why Are Local Variables Thread-Safe in Java
Learn why local variables are thread-safe in Java.
Refer to Environment Variables in pom.xml
Learn how to reference environment variables in a pom.xml file
The Covariant Return Type in Java
Explore what the covariance and covariant return types are and how they behave in Java.
Groovy Variable Scope
Learn about variable scope in Groovy
Spring @RequestParam vs @PathVariable Annotations
Understand the differences between Spring’s @RequestParam and @PathVariable annotations.
Various Logging Levels in Hibernate
A quick and practical overview of various logging levels in Hibernate.
Spring Optional Path Variables
Explore how to make a path variable optional in different Spring versions.
Spring Path Variables with Thymeleaf
Explore how to use Thymeleaf to create URLs with path variables.
Why Do Local Variables Used in Lambdas Have to Be Final or Effectively Final?
Learn why Java requires local variables to be effectively final when used in a lambda.