cn.net.wanmo.ocr.controller.HelloController Maven / Gradle / Ivy
package cn.net.wanmo.ocr.controller;
import cn.net.wanmo.ocr.config.TesseractConfig;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("hello")
public class HelloController {
@ResponseBody
@GetMapping("index")
public ResponseEntity index() {
System.out.println("TesseractConfig.datapath = " + TesseractConfig.datapath);
System.out.println("TesseractConfig.language = " + TesseractConfig.language);
System.out.println("TessVariableConfig.userDefinedDpi = " + TesseractConfig.varUserDefinedDpi);
return new ResponseEntity<>("success", HttpStatus.OK);
}
}