springboot

Spring Boot: What to do when Autowired stops working

That’s weird! Suddenly, you try to inject a dependency in your Spring Boot application, but it’s like @Autowired stopped working.

You will see this in several ways. IntelliJ will provide a warning from the Spring plugin, which says “Could not autowire. No beans of ‘YourBeanName’ type found.”

At runtime, Spring itself will fail with a message like:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.scottshipp.www.YourBeanName' available: expected at least 1 bean which qualifies as autowire candidate.

If this behavior looks familiar, please read on…

vagrantlogo

How to make Vagrant and Fedora play well together

If you have a multi-environment dev team with some of your staff using MacOS and some using one flavor of Linux and some using another flavor of Linux like Fedora then you might be tempted to try out virtualizing the development environment so there’s no weird configuration bugs (“works on my machine”). This might lead you to trying out Vagrant which nicely manages all the boxes and their configuration for you.

But when you run `vagrant up` on Fedora the first time, you might find that it fails with a message about the provider not working…

bash_shell

Automate everything (practical uses of Bash part 2)

I started this series with some quick time-savers. The goal of automation is saving time and providing focus on important things rather than tedious yak shaving. The time it takes to write a little script is hardly anything compared to the time it saves.

So here are some more useful tips including how to share functions across scripts, check for environment variables, output in color, and generalize checksum verification . . .

tdd

The most compelling reason for TDD

I practice TDD. There are a lot of reasons for this. Many of my reasons didn’t even become clear to me until after I had been doing TDD for awhile. Most people will tell you the same. It seems there are untold benefits that you have to experience for yourself. Just try it and see. If you are told about the benefits up-front, you will simply never experience for yourself how dramatic of an effect TDD can have.

But there is one reason to do TDD that I find more compelling than any other, and that reason still makes sense even if you only think about it.

The reason is simply that . . .