# Java-Bean-To-Ts-Interface **Repository Path**: TheFreeOne/Java-Bean-To-Ts-Interface ## Basic Information - **Project Name**: Java-Bean-To-Ts-Interface - **Description**: ---推荐使用json2ts之类的插件 ---- IDEA插件,将springmvc项目中接收json的请求体java类或者返回类转成typescript interface声明文件(d.ts), 在idea的plugin中搜索安装 - **Primary Language**: Java - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2022-11-03 - **Last Updated**: 2025-06-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: IDEA插件 ## README # Java-Bean-To-Ts-Interface A InteliJ IDEA Plugin - Convert java bean to typescript interface Right click on a java bean and select "java bean to typescript interface", select the file save path, then a declaration file end with '.d.ts' will be saved in this folder e.g. Right click on TestRequest.java, then click 'java bean to typescript interface' ```java public class TestRequest { /** * name list */ @NotNull private String nameArray[]; private List names; private Boolean isRunning; private boolean isSuccess; } ``` Result => TestRequest.d.ts ```typescript export default interface TestRequest{ /** * name list */ nameArray: string[] names?: string[] isRunning?: boolean isSuccess?: boolean } ```