Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vyvy-vi/myplugin
myplugin: Maven plugin that extracts spring boot endpoints
https://github.com/vyvy-vi/myplugin
Last synced: 9 days ago
JSON representation
myplugin: Maven plugin that extracts spring boot endpoints
- Host: GitHub
- URL: https://github.com/vyvy-vi/myplugin
- Owner: Vyvy-vi
- License: mit
- Created: 2024-05-04T19:22:44.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-05T16:58:59.000Z (9 months ago)
- Last Synced: 2025-01-20T20:56:34.031Z (15 days ago)
- Language: Java
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# myplugin (spring-boot-endpoint-finder)
This plugin was created after a session from Programming Pathshala on Maven, which involved a demonstration of creating Maven Plugins.The plugin can identify which API endpoints are defined in which controller in a SpringBoot project, assuming that all the RequestMappings are found in a folder named controllers or controller or web or rest. If the folder is not found, it just goes to the path given in dummyLocation variable.
In future, this could be extended to output swagger.json file and auto-document the API.
## Installation
1. Clone this project
```
git clone https://github.com/Vyvy-vi/myplugin
```
2. Open project in terminal and install it
```
cd myplugin
mvn install
```
3. In the main project, that is the SpringBoot project in which you want to run this plugin, open the pom.xml and add the following content:
```xml
org.apache.maven.plugins
maven-install-plugin
3.1.1
install-file
org.myplugin
myplugin
1.0
jar
MYPLUGINPATH
true
org.myplugin
myplugin
1.0
hello
```
Replace MYPLUGINJARPATH with the path to your compiled jar file. In my case, this was - `/Users/vy/repos/myplugin/target/myplugin-1.0-SNAPSHOT.jar`4. Install the main project
```
mvn install
```
5. For main project, select the Plugins dropdown from IntelliJ's maven panel, click on install and double click install:install-file. This should add myplugin to the project's plugins.6. Click on the new `my` dropdown in Plugins (it might have a different name?) and double click my:hello. This should run the plugin for the project, and the output should try to find a controllers/controller/rest/web folder and contain all the mappings from there.