Explore several String composition techniques and understand the idea behind String interpolation.
Search Results for: string template
OpenAPI Generator Custom Templates
Learn how to use OpenAPI Generator Custom Templates to generate customized client and server code from REST API definitions.
Passing Strings by Reference in Java
Learn how to change a method’s input String while preserving immutability and avoiding side effects.
How to Replace Deprecated jdbcTemplate.queryForObject and jdbcTemplate.query in Spring Boot 2.4.X and above
Laern about the deprecated queryForObject() and query() methods of JdbcTemplate and their preferred counterparts.
Consuming Page Entity Response From RestTemplate
Discover how to use RestTemplate to invoke a RESTful endpoint and read the response of type Page.
Replacing Variables in a Document Template with Java
Learn how to replace a pattern in various locations of a Word document.
Difference Between exchange(), postForEntity(), and execute() in RestTemplate
Learn three different ways to send a HTTP POST request using Spring’s RestTemplate.
Fix EmptyResultDataAccessException When Using JdbcTemplate
Explanation of the reason behind EmptyResultDataAccessException when jdbcTemplate is used and how to fix it.
Encoding of URI Variables on RestTemplate
Learn two methods for encoding URI variables on Spring’s RestTemplate.
Access HTTPS REST Service Using Spring RestTemplate
Learn how to consume a REST service secured with HTTPS using Spring’s RestTemplate.
Named Placeholders in String Formatting
Learn how to replace parameters in template-based strings from a set of values
Remove Whitespace From a String in Java
Explore common scenarios of removing whitespace from a String in Java
Introduction to OAuth2RestTemplate
Learn how to use Spring OAuth2RestTemplate to make OAuth2 REST calls
Spring RestTemplate Exception: “Not enough variables available to expand”
Learn about Spring’s RestTemplate Not enough variables available to expand IllegalArgumentException.
Get list of JSON objects with Spring RestTemplate
Spring RestTemplate can convert a JSON array to a variety of Java types. We look at the options and how to produce a type-specific list.
Reading an HTTP Response Body as a String in Java
Explore several options for reading an HTTP response body as a string in Java
Spring RestTemplate Request/Response Logging
A quick and practical guide to RestTemplate logging.
Proxies With RestTemplate
Learn how to send a request to a proxy using Apache’s RestTemplate in Java.
String Concatenation with Invoke Dynamic
Learn about relatively new Java optimization: string concatenation with invokedynamic
Using a List of Values in a JdbcTemplate IN Clause
Learn how to pass a list of values into the IN clause of a Spring JDBC template query