Accelerate Java API Development with Magic‑API: A Hands‑On Guide

This article introduces Magic‑API, a Java‑based rapid API development framework, outlines its extensive feature set, and provides step‑by‑step instructions—including Maven integration, configuration, and visual UI usage—to help developers create HTTP endpoints without writing traditional controller or DAO code.

Java Web Project
Java Web Project
Java Web Project
Accelerate Java API Development with Magic‑API: A Hands‑On Guide

Overview

magic-api is a Java framework that enables rapid development of HTTP APIs through a built‑in visual editor. API definitions are written as scripts; the framework automatically maps them to HTTP endpoints, eliminating the need for explicit Controllers, Services, DAOs, Mappers, XML files or VO classes.

Key Features

Supports JDBC‑compliant databases such as MySQL, MariaDB, Oracle, DB2, PostgreSQL and SQLServer.

Supports NoSQL stores including Redis and MongoDB.

Enables cluster deployment with automatic interface synchronization.

Provides built‑in pagination queries and customizable pagination logic.

Allows multiple data‑source configurations and runtime dynamic data‑source switching.

Offers SQL caching and custom SQL cache definitions.

Supports custom JSON responses and custom pagination result formats.

Includes interface permission configuration and interceptor mechanisms.

Generates Swagger API documentation automatically.

Powered by the magic‑script engine, which compiles scripts dynamically, enabling real‑time publishing without application restarts.

Provides LINQ‑style query syntax for simpler joins and transformations.

Supports database transactions, SQL concatenation, placeholders and conditional expressions.

Handles file upload, download and image output.

Tracks script version history with comparison and rollback capabilities.

Offers script code auto‑completion, parameter hints, hover hints and error diagnostics.

Allows importing Spring beans and arbitrary Java classes directly.

Includes an online debugging console.

Extensible with custom utilities, modules, type extensions, dialects and column‑name conversion.

Quick Start

1. Add the Maven starter

<!-- Add as a Spring Boot starter -->
<dependency>
  <groupId>org.ssssssss</groupId>
  <artifactId>magic-api-spring-boot-starter</artifactId>
  <version>1.7.1</version>
</dependency>

2. Configure application.properties

server.port=9999
# UI entry point
magic-api.web=/magic/web
# Resource location (classpath prefix means read‑only mode)
magic-api.resource.location=/data/magic-api

Start the Spring Boot application and open http://localhost:9999/magic/web to access the visual API editor.

Project Screenshots

Magic‑API UI screenshot
Magic‑API UI screenshot
API editing demo
API editing demo
Script version comparison
Script version comparison
Debug console
Debug console

Open‑Source Repository

Gitee: https://gitee.com/ssssssss-team/magic-api

Javabackend developmentSpring BootAPImagic-api
Java Web Project
Written by

Java Web Project

Focused on Java backend technologies, trending internet tech, and the latest industry developments. The platform serves over 200,000 Java developers, inviting you to learn and exchange ideas together. Check the menu for Java learning resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.