dataease-dm/backend/src/main/java/io/dataease/controller/DisplayController.java

24 lines
782 B
Java
Raw Normal View History

2021-03-01 11:37:04 +08:00
package io.dataease.controller;
import io.dataease.service.BaseDisplayService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.IOException;
@RestController
@RequestMapping
public class DisplayController {
@Resource
private BaseDisplayService baseDisplayService;
@GetMapping("display/file/{imageName}")
public ResponseEntity<byte[]> image(@PathVariable("imageName") String imageName) throws IOException {
return baseDisplayService.getImage(imageName);
}
}