数字验证码 骨架编写

main
topsun 2 years ago
parent 14f79c3f1c
commit e54167c8fe

@ -0,0 +1,24 @@
package com.spring.serviceverificationcode.controller;
import com.sun.org.glassfish.gmbal.ParameterNames;
import net.sf.json.JSONObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class NumberCodeController {
@GetMapping("/numberCode/{size}")
public String numberCode(@PathVariable("size") int size){
System.out.println("size:"+size);
JSONObject resultObj = new JSONObject();
resultObj.put("code",1);
resultObj.put("message","success");
JSONObject jsonObjectData = new JSONObject();
jsonObjectData.put("numberCode",123456);
resultObj.put("data",jsonObjectData);
return resultObj.toString();
}
}
Loading…
Cancel
Save