| | |
| | | package com.ltkj.web.jmreport; |
| | | |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.omg.CORBA.Environment; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.io.FileInputStream; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.util.Properties; |
| | | |
| | | import static jdk.nashorn.internal.runtime.regexp.joni.Config.log; |
| | | |
| | | /** |
| | | * @Company: 西安路泰科技有限公司 |
| | |
| | | @RestController |
| | | @RequestMapping("/report/jmreport") |
| | | @Api(tags = "PC端 积木报表接口集") |
| | | @Slf4j |
| | | public class JimuController { |
| | | @Value("${jimu.path}") |
| | | private String value; |
| | | // @Value("${jimu.path}") |
| | | private static String value; |
| | | |
| | | |
| | | private static String CONFIG_PATH; |
| | | |
| | | @Value ("${config.properties}") |
| | | public void setConfigPath(String path) { |
| | | CONFIG_PATH = path; |
| | | try { |
| | | FileInputStream inputStream = new FileInputStream(CONFIG_PATH); |
| | | Properties props = new Properties(); |
| | | props.load(inputStream); |
| | | value= props.getProperty("jmurl"); |
| | | } catch (IOException throwables) { |
| | | throwables.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | // static { |
| | | // Properties props = new Properties(); |
| | | // try { |
| | | // // 从文件中读取配置信息 |
| | | // FileInputStream fis = null; |
| | | // try { |
| | | // fis = new FileInputStream("D:\\ltkjprojectconf\\sfconfig.properties"); |
| | | // } catch (FileNotFoundException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // props.load(fis); |
| | | // fis.close(); |
| | | // // 获取属性值并赋值 |
| | | // } catch (Exception e) { |
| | | // log.info("数据库连接失败 请联系管理员!"); |
| | | // e.printStackTrace(); |
| | | // } |
| | | // value= props.getProperty("jmurl"); |
| | | // } |
| | | |
| | | @GetMapping("/index") |
| | | @ApiOperation(value = "index") |