Blog

Page 363 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Failed to configure a DataSource: "url" attribute is not specified and no embedded datasource could be configured
spring

Failed to configure a DataSource: "url" attribute is not specified and no embedded datasource could be configured

Published on September 2, 2023

## \[Troubleshooting Guide\] Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured So you're building a Spring Boot Batch application with MongoDB, and you've encountered the dreaded error messag

Cover Image for Type safety: Unchecked cast
javaspring

Type safety: Unchecked cast

Published on September 2, 2023

# Type safety: Unchecked cast - What's the Deal? 😮 So you're working on your Java project, feeling all confident and mighty, when suddenly you come across this pesky warning in Eclipse: **Type safety: Unchecked cast from Object to HashMap<String,String>

Cover Image for What"s the difference between Hibernate and Spring Data JPA
hibernatejavajpaspringspring-data-jpa

What"s the difference between Hibernate and Spring Data JPA

Published on September 2, 2023

## Understanding the Differences: Hibernate vs Spring Data JPA 🌟 Hey there, tech enthusiasts! šŸ‘‹ Are you feeling a tad perplexed about the differences between Hibernate and Spring Data JPA? Fear not, for we've got your back! In this blog post, we'll dive

Cover Image for Understanding Spring @Autowired usage
javaspring

Understanding Spring @Autowired usage

Published on September 2, 2023

# Understanding Spring @Autowired Usage Do you find yourself scratching your head when trying to understand how to use the `@Autowired` annotation in the Spring framework? You're not alone! Many developers struggle with the same question. But fear not, th

Cover Image for Spring Boot - How to log all requests and responses with exceptions in single place?
javaspring

Spring Boot - How to log all requests and responses with exceptions in single place?

Published on September 2, 2023

# šŸ“ How to Log All Requests and Responses with Exceptions in a Single Place with Spring Boot Are you working on a REST API with Spring Boot? Do you need to log all requests, including input parameters, methods, and responses, in a single place? If so, th

Cover Image for What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?
javaspring

What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?

Published on September 2, 2023

# šŸš€ The Difference Between application.yml and bootstrap.yml in Spring Boot Are you confused about where to put your properties in Spring Boot? šŸ¤” Don't worry, you're not alone! In this blog post, we'll explore the differences between the `application.ym

Cover Image for Check if value exists in Postgres array
arrays

Check if value exists in Postgres array

Published on September 2, 2023

## **šŸ” Checking if a Value Exists in Postgres Array** Are you stuck trying to figure out how to check if a value exists in a Postgres array? Look no further! In this blog post, we'll explore some common issues and provide you with easy solutions to solve

Cover Image for How to check String in response body with mockMvc
javamockingspring

How to check String in response body with mockMvc

Published on September 2, 2023

šŸ”Ž How to check String in response body with mockMvc? šŸ“ So you're working on an integration test using mockMvc and you want to check if a specific string is present in the response body. You've tried a few things but haven't had any success. Don't worry,

Cover Image for Populating Spring @Value during Unit Test
javajunitspring

Populating Spring @Value during Unit Test

Published on September 2, 2023

# Populating Spring @Value during Unit Test: A Simple Guide šŸ” **Problem**: You want to write unit tests for a bean in your Spring program that uses the `@Value` annotation to initialize its properties. However, you'd prefer to avoid using a properties fi

Blog | Matheus Mello