Steps to access spring security protected APIs very much depend upon the Web Security Configuration in your spring boot project.

Below example i have tried to demonstrate two different Web Security Configuration and how to access it using curl.

Suppose we are trying to access following end url
http://localhost:8080/api/student

Example…

While using lombok in eclipse , you might encounter error like Slf4j log variable is not recognised by lombok in eclipse

Steps to properly configure lombok in eclispe ide is as follows:

  1. Ensure that lombok dependency is present in pom.xml file
<!-- lombok dependency. -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>

2. Download lombok jar from link
https://projectlombok.org/downloads/lombok.jar

3. Install Lombok

  • Goto the jar location from the command prompt and run the following command java -jar lombok-1.16.18.jar and we should be greeted by Lombok installation window.
  • Now click on the “Specify Location” button and locate the eclipse.exe path under eclipse installation folder like this.
  • Now click the “Install/Update”.
  • Restart eclipse.

Thats it!

Resources:

https://howtodoinjava.com/automation/lombok-eclipse-installation-examples/
https://stackoverflow.com/questions/3418865/cannot-make-project-lombok-work-on-eclipse/3425327#3425327

In web development, we usually separate the front-end application and back-end application. we expose APIs as a back-end component for the front-end component or third-party app integrations.

Swagger is a library that helps to auto generate the documentation of backend APIs. Moreover, it also supports testing of APIs .

API…

Himanshu Pratap

System Administrator and Full stack web developer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store