In this article, we get to take a look at an awesome little project called Project Lombok. If you have been following me for awhile now then you already know I am a huge fan of the Groovy Programming Language. It takes a lot of the things I don’t like in Java and makes them better. Like, way better! Groovy is also really GOOD at cutting down the amount of ceremonious code you have to write.
If you are working on a Java project and are looking for a way to cut down some of the noise in your code I have a great solution for you. In this article, we are going to look at Project Lombok and dive into what it is and how to use it in your next Spring Boot Application.
I recently had my question featured on the Ask Pat Podcast. For those of you who don’t know Pat Flynn, he’s a very successful entrepreneur who runs the website Smart Passive Income. Smart Passive Income is a resource to teach you proven strategies for running an online business and optimizing it for passive income. The Ask Pat podcast is your business questions answered in a bite-sized podcast five days a week, Monday through Friday.
I can hear the questions coming in now. Dan, I thought you were going to stop blogging about business related topics. That is still my focus but in this case, I can assure you this article has some real value for my audience.
When software developers get introduced to the Spring Framework there are some concepts that can be a little confusing. The good news is once we wrap our head around them they can become second nature. Spring has some specialized annotations called Stereotype Annotations. If that concept is new to you don’t worry, we are going to break everything down for you in this article.
Stereotype & Annotation Defined
Before we dive into what Spring Stereotype annotations are I think it’s important for us to understand what these two words mean. The word stereotype is defined in the Merriam-Webster dictionary as:
stereotype: (noun) something conforming to a fixed or general pattern; especially : a standardized mental picture that is held in common by members of a group and that represents an oversimplified opinion, prejudiced attitude, or uncritical judgment
We have to remember that when we put applications out into the wild that things will go wrong. This can be in the form of a user going to a wrong URL or entering invalid data. As much as we like to always blame the users (it must be user error, right?) there are times when we as developers make mistakes.
What we need to understand is that it is ok for both the users and us to make mistakes as long as we account for them. When a user requests a URI that doesn’t exist we need to show them a proper 404 (page not found) error page. We can even take this one step further and provide additional resources on this page to help them find what they are looking for. In this article, we will look at some improvements in Spring Boot 1.4 that help us define convention based error pages.
In this article, we will look at some improvements in Spring Boot 1.4 that help us define convention based error pages.
I had a question from a student come up that a lot of new Spring developers come across. It has to do with creating components and in this case more specifically, entities. Let’s take a look at the question and then dive into the solution.
Hey, I’m trying to get JPA to create the post and author tables and view them in the H2 console. I copied every step in the video and tried the suggestions to change the JDBC url to :testdb. I’ve also tried changing spring.datasource.name: to both test and testdb, all with no luck. When the console comes up, there are no tables. Any help would be most appreciated!! Here is the code in a repo, if that helps!
Towards the end of 2016 and into the beginning of this year my website and blog have become a little stagnant. Part of the reason for this has been that with remodeling our new house and planning a wedding me and my fiance have been extremely busy. Another reason for this is that I have been wearing my entrepreneur hat a lot lately and have been involved in many different projects. With all of the projects that I have taken on, I lost the purpose of this website somewhere along the way and I want to address that today.
I recently found myself asking some tough questions.
- What is the purpose of this website?
- Who does it serve?
- What value does it provide to its visitors?
There is a free preview of a book on Cloud Native Java. I had a chance to go through the first chapter this evening and there is some really good information packed in there. Here is a little bit about the book and a link to download the preview.
We invite you to download the O’Reilly eBook: Cloud-Native Java: Designing Resilient Systems with Spring Boot, Spring Cloud, and Cloud Foundry, authored by Pivotal’s Josh Long and Kenny Bastani.
In four content-packed chapters, you will learn:
- How to get started with Spring Initializr, the Spring Tool Suite, and the Spring Guides
- The patterns, scalability, reliability, and agility of a cloud-native platform and cloud-native applications
- About event-driven architectures with Spring Integration, and how Spring Cloud Stream makes it easy to define channels that are connected to messaging technologies
- Why Spring Batch has become a widely used industry standard to support processing large volumes of records on the JVM
I saw this drawing on Twitter and got a real good laugh out of it. My next thought was… Wow, I’m a dork. Thanks to David Neal (@reverentgeek) for the drawing
Question: How many of these IDE’s are you using?
My number one priority as far as work goes is always going to be my full time employment. With the end of the year I had a project that had to take focus. This along with the Toys for Shots party I throw every year and the holidays really took up my entire December. Last year I said I wanted to be a little more transparent and I did these reports for the entire year.
It was a fun little experiment but unless these are really helping or inspiring someone they are probably going to come to end. I do all of these manually and unless I find a way to automate they take up some valuable time. If you really want them to stick around please speak up and thank you for everyone who tuned into these all year long.
I feel like a broken record with these “excuses” each month but the simple fact is I can only do so much. With that I have to prioritize what is important to me and in certain months like this one things like The Blog, Social Media & The YouTube channel are going to suffer.
With that said though I launched a new course this month called Merch by Amazon – How to start your own t-shirt business. I also doubled my best month ever in sales on Udemy which I am beyond proud of. Thank you to all of you who keep leaving me these amazing reviews in my courses. It really keeps pushing me to do what I do and LOVE what I do.