Creating an API with Spring Boot and MySQL

Learn how to write an API by example!

Adam Zink
2 min readJul 17, 2018

I recently learned how to use the Spring Boot framework, and I have quickly become a fan of the speed at which I can go from basic idea to working application.

Spring Boot accomplishes this feat in the traditionally verbose Java language with conventions and annotations to shorten development time and reduce total lines of code.

That said, Spring Boot is a very large framework, rich with powerful features and configuration settings. I can say from first-hand experience how these same qualities make frameworks intimidating to learn. Fortunately, most of the settings have default values and deep understanding is not required at the beginner level.

Learning Spring Boot

I have assembled a set of hands-on tutorials for using Spring Boot to create a simple REST-inspired API (Application Programming Interface). APIs are the backbone of the web, allowing connected applications to grow independently of each other by communicating through stable interfaces.

The tutorials start with using the Spring Initializr tool for generating the project structure, and then each successive part builds upon the foundation, breaking down the new code into manageable pieces with my explanations.

My first exposure to Spring Boot was making enhancements to an existing project, so I initially copied the coding patterns of my peers without fully understanding how it works or why decisions were made a certain way. During the creation of these tutorials, I have discovered more about what each line of code actually does, and I have done my best to pass it along in simple, helpful language.

Enjoy!

--

--