新建SpringBoot项目
其他语言其他框架也差不多,简单入门写个网络接口还是很快的。
配置文件:
server:
servlet:
context-path: /
port: 8080
工程目录:
TestController.java:
package com.deng.controller;
import com.alibaba.fastjson.JSONObject;
import com.deng.bean.Answer;
import com.deng.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value