npm package: @skills-cli/vue2-springboot-mybatis
Description: Universal coding assistance skills for Vue2 + SpringBoot + MyBatis full-stack development
Author: skills-cli
Latest version: 1.0.1

# @skills-cli/vue2-springboot-mybatis

Universal coding assistance skills for **Vue2 + SpringBoot + MyBatis** full-stack development. Provides code generation templates and helpers for rapid development.

## Installation

```bash
skills add @skills-cli/vue2-springboot-mybatis
```

## Features

- **Vue2 Code Generation**
  - Single-file component template
  - CRUD list page with pagination
  - Form modal component
  - API service module

- **SpringBoot Code Generation**
  - Controller layer with RESTful APIs
  - Service layer with business logic interface
  - Entity class with Lombok
  - Mapper interface

- **MyBatis Code Generation**
  - XML Mapper with CRUD operations
  - Result map configuration
  - Dynamic SQL support

## Capabilities

- `generate-vue2-component` - Generate Vue2 single-file component
- `generate-vue2-crud-page` - Generate complete CRUD page (list + form + API)
- `generate-springboot-controller` - Generate SpringBoot REST Controller
- `generate-springboot-service` - Generate Service interface and implementation
- `generate-mybatis-entity` - Generate MyBatis entity class
- `generate-mybatis-mapper` - Generate Mapper interface
- `generate-mybatis-xml` - Generate MyBatis XML mapper
- `generate-crud-fullstack` - Generate full-stack CRUD from table definition

## Usage Example

```javascript
const skill = require('@skills-cli/vue2-springboot-mybatis');

// Generate Vue2 CRUD page
const vueCrud = skill.generateVue2Crud('User', 'user', [
  { name: 'id', type: 'Long', label: 'ID', primaryKey: true },
  { name: 'username', type: 'String', label: 'Username', required: true },
  { name: 'email', type: 'String', label: 'Email' },
  { name: 'createTime', type: 'Date', label: 'Create Time' }
]);

// Generate SpringBoot Controller
const controller = skill.generateSpringBootController('User', 'user');

// Generate MyBatis Entity
const entity = skill.generateMyBatisEntity('User', columns);
```

## Configuration

You can configure in your `skills.json`:

```json
{
  "config": {
    "@skills-cli/vue2-springboot-mybatis": {
      "vue2": {
        "componentPath": "src/components",
        "viewPath": "src/views",
        "apiPath": "src/api"
      },
      "springboot": {
        "basePackage": "com.yourcompany.project",
        "author": "Your Name"
      }
    }
  }
}
```

## API

### Vue2 Generation

- `generateVue2Component(name, options)` - Generate Vue2 single-file component
- `generateVue2CrudPage(entityName, tableName, columns)` - Generate CRUD list page
- `generateVue2FormModal(entityName, columns)` - Generate form modal component
- `generateVue2Api(entityName, tableName)` - Generate API service module

### SpringBoot Generation

- `generateMyBatisEntity(entityName, columns, packageName)` - Generate entity class
- `generateMyBatisMapper(entityName, packageName)` - Generate Mapper interface
- `generateSpringBootService(entityName, packageName)` - Generate Service
- `generateSpringBootController(entityName, packageName)` - Generate Controller
- `generateMyBatisXml(entityName, tableName, columns)` - Generate XML mapper

### Full Stack

- `generateFullStackCrud(entityName, tableName, columns, config)` - Generate all files

## License

MIT