From b94ff562a52486dcdc02b864117e830fa8d85e2a Mon Sep 17 00:00:00 2001 From: yangfuhai Date: Wed, 23 Aug 2017 17:56:27 +0800 Subject: [PATCH] add config manager component in jboot --- .../jboot/config/JbootConfigController.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/jboot/config/JbootConfigController.java b/src/main/java/io/jboot/config/JbootConfigController.java index 51acbe7eb..b130cb291 100644 --- a/src/main/java/io/jboot/config/JbootConfigController.java +++ b/src/main/java/io/jboot/config/JbootConfigController.java @@ -16,6 +16,7 @@ package io.jboot.config; import com.jfinal.aop.Clear; +import com.jfinal.core.paragetter.Para; import com.jfinal.kit.Ret; import io.jboot.web.controller.JbootController; import io.jboot.web.controller.annotation.RequestMapping; @@ -27,7 +28,26 @@ @RequestMapping("/jboot/config") public class JbootConfigController extends JbootController { - public void index() { + public void index(@Para(value = "propertie", defaultValue = "jboot.properties") String propertie, String prefix) { + + renderJson(Ret.fail("msg", "sorry, you have no permission to visit this page. ")); + } + + + /** + * 列出本地目录下的文件信息 + */ + public void list() { renderJson(Ret.fail("msg", "sorry, you have no permission to visit this page. ")); + +// File classPathDir = new File(PathKit.getRootClassPath()); +// String[] names = classPathDir.list(new FilenameFilter() { +// @Override +// public boolean accept(File dir, String name) { +// return name.endsWith(".properties"); +// } +// }); +// +// renderJson(Arrays.toString(names)); } }