How to start develop Spring Boot application from Notepad

While writing our codes in Java is easier done using specialized Java IDE (integration development environment) like Eclipse, VS code, IntelliJ, there’s actually no requirement to make your java application. You can just write the code using any tools.

The advantage of writing codes in a simple editor like notepad is the lightness of the program, when writing codes in IDE it just feels sluggish when we are typing on it. Because in Notepad, you won’t be given any code suggestions, like method, variable, class etc, so you are typing faster.

It can be cumbersome for new developers writing java code in a simple editor, but it is worth a try. So, let’s do it.

1. Install notepad++

We are not going to use the default windows notepad, it’s too ancient to do basically anything, so let’ s just give you the improved version of notepad, the notepad++. You can download from the web official download page here https://notepad-plus-plus.org/downloads/.

2. Create spring boot skeleton app

Go to the page start.spring.io and then select several dependencies and generate the zip archive file and extract it to your project location that you desire. Because we are going to develop a simple Rest API, we need to select the Spring starter web.

- Spring web is the starter web for developing Rest API or MVC in spring

- Spring devtools is for easy development process, for example auto reload when you type mvn package

- Lombok is uses for making nicer look our POJO without having to create getter and setter

3. Open your notepad

Open your notepad, select file, open folder as workspace and then navigate to your spring boot project folder, then open it. Now you can start exploring the structure of your spring boot project. Here’s from notepad++ what a typical spring boot application looks like.

4. Running our spring project

On your notepad select menu Plugins, Plugin’s admin, and install RunMe plugin. After the installation process finishes, Notepad will restart and the new plugin will be available. Now we have to create two bash files for running our spring application and build the application.

- Create BUILD.bat

mvnw package

Open the BUILD.bat and hit Shift+F5 to build your spring application. Every time there’s code change, you open this file and execute shift+f5 to refresh your spring program.

- Create RUN.bat

mvnw spring-boot:run

Open the RUN.bat and hit Shift+F5 to run your application. This is done only once, unless there’s some error that you need to fix it first and rerun the application.

Now you can begin writing your spring boot application within the notepad++. It requires basic knowledge of writing spring boot applications, for example you must know in which package the class, annotation is located. Which method is available, etc.? Because the notepad won’t give you any suggestions.

After all, it's fun writing Java codes from scratch without the help of an IDE. but it isn't going to be productive if you are not advanced enough, don't have a good enough understanding of Spring framework. It’s going to be much more productive if you have the knowledge of the framework.


Popular posts from this blog

Spring Kafka - how to use ReplyingKafkaTemplate send and reply synchronously

How To Connect SSH Using PEM Certificate On Windows

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans

Flutter Button With Left Align Text and Icon