java getwebrootpath_Java PathKit.getWebRootPath方法代碼示例

本文详细介绍了Java中com.jfinal.kit.PathKit.getWebRootPath方法的用法,提供了多个代码示例,包括在启动、主函数、获取UE文件路径、上传下载操作等场景下的应用。适用于需要理解该方法如何在实际项目中使用的开发者。

本文整理匯總了Java中com.jfinal.kit.PathKit.getWebRootPath方法的典型用法代碼示例。如果您正苦於以下問題:Java PathKit.getWebRootPath方法的具體用法?Java PathKit.getWebRootPath怎麽用?Java PathKit.getWebRootPath使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.jfinal.kit.PathKit的用法示例。

在下文中一共展示了PathKit.getWebRootPath方法的21個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。

示例1: start

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

@SuppressWarnings("unchecked")

@Override

public boolean start() {

// TODO Auto-generated method stub

files = new ArrayList();

try{

//得到該CLASSPATH的URL路徑

String classpath = PathKit.getRootClassPath();

//兼容JBOSS7.1.0-Final,classpath的問題

classpath = PathKit.getWebRootPath();

File root = new File(classpath);

//遍曆CLASSPATH下的所有.class文件並複製到files中

files = PluginCommon.getInstance().getFileSetByEndName(classpath, "class");

for(File f : files){

Class extends BaseModel>> c = (Class extends BaseModel>>) PluginCommon.getInstance().getClass(root.getPath(),f.getPath());

//Class mvc_model = BaseModel.class;

if(c.getAnnotation(Table.class) != null && c.getName().contains(prefix)){

mappingModel(c);

}

}

}catch (FileNotFoundException e) {

System.err.println(e.getMessage());

e.printStackTrace();

}

return false;

}

開發者ID:slashchenxiaojun,項目名稱:wall.e,代碼行數:27,

示例2: main

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public static void main(String[] args) {

// base model 所使用的包名

String baseModelPackageName = "org.hacker.mvc.model.base";

// base model 文件保存路徑

String baseModelOutputDir = PathKit.getWebRootPath() + "/src/main/java/org/hacker/mvc/model/base";

// model 所使用的包名 (MappingKit 默認使用的包名)

String modelPackageName = "org.hacker.mvc.model";

// model 文件保存路徑 (MappingKit 與 DataDictionary 文件默認保存路徑)

String modelOutputDir = baseModelOutputDir + "/..";

// 創建生成器

Generator gernerator = new Generator(getDataSource(),

new CustomBaseModelGenerator(baseModelPackageName, baseModelOutputDir),

new CustomModelGenerator(modelPackageName, baseModelPackageName, modelOutputDir));

// 添加不需要生成的表名

gernerator.addExcludedTable(new String[]{""});

// 設置是否在 Model 中生成 dao 對象

gernerator.setGenerateDaoInModel(true);

// 設置是否生成字典文件

gernerator.setGenerateDataDictionary(false);

// 設置需要被移除的表名前綴用於生成modelName。例如表名 "osc_user",移除前綴 "osc_"後生成的model名為 "User"而非 OscUser

gernerator.setRemovedTableNamePrefixes(new String[]{"w_"});

// 生成

gernerator.generate();

}

開發者ID:slashchenxiaojun,項目名稱:wall.e,代碼行數:27,

示例3: getUeFolder

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

/**

* @return UE 文件存儲路徑

*/

public static String getUeFolder() {

// UE上傳路徑

String saveFoloder = GojaConfig.getProperty(GojaPropConst.UE_UPLOAD_PATH, "upload");

// 是否為絕對路徑

boolean absolute_flag = StringUtils.startsWith(saveFoloder, "://") || StringUtils.startsWith(saveFoloder, StringPool.SLASH);

if (!absolute_flag) {

//不是絕對路徑,則設置根目錄

saveFoloder = PathKit.getWebRootPath() + File.separator + saveFoloder;

}

saveFoloder = (StringUtils.endsWith(saveFoloder, File.separator)) ? saveFoloder : saveFoloder + File.separator;

try {

Files.createParentDirs(new File(saveFoloder + ".ueconfig"));

} catch (IOException e) {

throw new RuntimeException("創建UE目錄出現問題,無法存儲上傳的文件!");

}

return saveFoloder;

}

開發者ID:GojaFramework,項目名稱:goja,代碼行數:21,

示例4: index

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public UploadFileResponse index() {

String uploadFieldName = "imgFile";

SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");

String fileExt = getFile().getFileName().substring(

getFile(uploadFieldName).getFileName().lastIndexOf(".") + 1)

.toLowerCase();

SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");

String uri = Constants.ATTACHED_FOLDER + getPara("dir") + "/"

+ sdf.format(new Date()) + "/" + df.format(new Date()) + "_"

+ new Random().nextInt(1000) + "." + fileExt;

String finalFilePath = PathKit.getWebRootPath() + uri;

FileUtils.moveOrCopyFile(PathKit.getWebRootPath() + Constants.ATTACHED_FOLDER + getFile(uploadFieldName).getFileName(), finalFilePath, true);

UploadFileResponse uploadFileResponse = new UploadFileResponse();

uploadFileResponse.setError(0);

uploadFileResponse.setUrl(new UploadService().getCloudUrl(getRequest().getContextPath(), uri, finalFilePath, getRequest()));

return uploadFileResponse;

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:20,

示例5: download

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public DownloadUpdatePackageResponse download() {

DownloadProcessHandle handle = downloadProcessHandleMap.get(AdminTokenThreadLocal.getUser().getSessionId());

if (handle == null) {

File file = new File(PathKit.getWebRootPath() + "/WEB-INF/update-temp/" + "zrlog.war");

file.getParentFile().mkdir();

Version version = lastVersion().getVersion();

handle = new DownloadProcessHandle(version, file);

try {

HttpUtil.getInstance().sendGetRequest(version.getDownloadUrl(), handle, new HashMap());

} catch (IOException e) {

e.printStackTrace();

}

}

downloadProcessHandleMap.put(AdminTokenThreadLocal.getUser().getSessionId(), handle);

DownloadUpdatePackageResponse downloadUpdatePackageResponse = new DownloadUpdatePackageResponse();

downloadUpdatePackageResponse.setProcess(handle.getProcess());

return downloadUpdatePackageResponse;

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:19,

示例6: upload

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public UploadTemplateResponse upload() {

String uploadFieldName = "file";

String templateName = getFile(uploadFieldName).getOriginalFileName();

String finalPath = PathKit.getWebRootPath() + Constants.TEMPLATE_BASE_PATH;

String finalFile = finalPath + templateName;

FileUtils.deleteFile(finalFile);

//start extract template file

FileUtils.moveOrCopyFile(getFile(uploadFieldName).getFile().toString(), finalFile, true);

UploadTemplateResponse response = new UploadTemplateResponse();

response.setMessage(I18NUtil.getStringFromRes("templateDownloadSuccess", getRequest()));

try {

String extractFolder = finalPath + templateName.replace(".zip", "") + "/";

FileUtils.deleteFile(extractFolder);

ZipUtil.unZip(finalFile, extractFolder);

} catch (IOException e) {

e.printStackTrace();

}

return response;

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:21,

示例7: download

​點讚 3

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public void download() {

try {

String fileName = getRequest().getParameter("templateName");

String templatePath = fileName.substring(0, fileName.indexOf("."));

File path = new File(PathKit.getWebRootPath() + Constants.TEMPLATE_BASE_PATH + templatePath + "/");

if (!path.exists()) {

HttpFileHandle fileHandle = (HttpFileHandle) HttpUtil.getInstance().sendGetRequest(getPara("host") + "/template/download?id=" + getParaToInt("id"),

new HttpFileHandle(PathKit.getWebRootPath() + Constants.TEMPLATE_BASE_PATH), new HashMap());

String target = fileHandle.getT().getParent() + "/" + fileName;

FileUtils.moveOrCopyFile(fileHandle.getT().toString(), target, true);

ZipUtil.unZip(target, path.toString() + "/");

setAttr("message", I18NUtil.getStringFromRes("templateDownloadSuccess", getRequest()));

} else {

setAttr("message", I18NUtil.getStringFromRes("templateExists", getRequest()));

}

} catch (Exception e) {

setAttr("message", I18NUtil.getStringFromRes("someError", getRequest()));

LOGGER.error("download error ", e);

}

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:22,

示例8: moveFile

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

/**

* @param uploadFile

* @return new file relative path

*/

public static String moveFile(UploadFile uploadFile) {

if (uploadFile == null)

return null;

File file = uploadFile.getFile();

if (!file.exists()) {

return null;

}

String webRoot = PathKit.getWebRootPath();

String uuid = UUID.randomUUID().toString().replace("-", "");

StringBuilder newFileName = new StringBuilder(webRoot).append(File.separator).append("attachment")

.append(File.separator).append(dateFormat.format(new Date())).append(File.separator).append(uuid)

.append(FileUtils.getSuffix(file.getName()));

File newfile = new File(newFileName.toString());

if (!newfile.getParentFile().exists()) {

newfile.getParentFile().mkdirs();

}

file.renameTo(newfile);

return FileUtils.removePrefix(newfile.getAbsolutePath(), webRoot);

}

開發者ID:lusparioTT,項目名稱:OooO,代碼行數:32,

示例9: start

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public boolean start() {

if (ctx != null)

IocInterceptor.ctx = ctx;

else if (configurations != null)

IocInterceptor.ctx = new FileSystemXmlApplicationContext(configurations);

else

IocInterceptor.ctx = new FileSystemXmlApplicationContext(PathKit.getWebRootPath() + "/WEB-INF/applicationContext.xml");

return true;

}

開發者ID:OpeningO,項目名稱:JFinal-ext2,代碼行數:10,

示例10: ImageHunter

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public ImageHunter() {

this.savePath = UEConfig.me.getCatcherPathFormat();

this.rootPath = PathKit.getWebRootPath() + File.separator;

this.maxSize = UEConfig.me.getCatcherMaxSize();

this.allowTypes = UEConfig.me.getCatcherAllowFiles();

this.filters = UEConfig.me.getCatcherLocalDomain();

}

開發者ID:GojaFramework,項目名稱:goja,代碼行數:10,

示例11: thumbnail

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public UploadFileResponse thumbnail() throws IOException {

String uploadFieldName = "imgFile";

SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");

String fileExt = getFile().getFileName().substring(getFile(uploadFieldName).getFileName().lastIndexOf(".") + 1).toLowerCase();

SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");

String uri = Constants.ATTACHED_FOLDER + getPara("dir") + "/" + sdf.format(new Date()) + "/" + df.format(new Date()) + new Random().nextInt(1000) + "_thumbnail" + "." + fileExt;

File imgFile = getFile(uploadFieldName).getFile();

String finalFilePath = PathKit.getWebRootPath() + uri;

File thumbnailFile = new File(finalFilePath);

int height = -1;

int width = -1;

byte[] bytes = IOUtil.getByteByInputStream(new FileInputStream(imgFile));

if (!thumbnailFile.getParentFile().exists()) {

thumbnailFile.getParentFile().mkdirs();

}

if (!fileExt.equalsIgnoreCase("gif")) {

IOUtil.writeBytesToFile(ThumbnailUtil.jpeg(bytes, 1f), thumbnailFile);

BufferedImage bimg = ImageIO.read(thumbnailFile);

height = bimg.getHeight();

width = bimg.getWidth();

} else {

IOUtil.writeBytesToFile(bytes, thumbnailFile);

}

FileUtils.moveOrCopyFile(thumbnailFile.toString(), finalFilePath, true);

UploadFileResponse uploadFileResponse = new UploadFileResponse();

uploadFileResponse.setError(0);

uploadFileResponse.setUrl(new UploadService().getCloudUrl(getRequest().getContextPath(), uri, finalFilePath, getRequest()) + "?h=" + height + "&w=" + width);

return uploadFileResponse;

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:30,

示例12: delete

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public WebSiteSettingUpdateResponse delete() {

String template = getPara("template");

File file = new File(PathKit.getWebRootPath() + template);

if (file.exists()) {

FileUtils.deleteFile(file.toString());

}

return new WebSiteSettingUpdateResponse();

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:9,

示例13: config

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public String config() {

String templateName = getPara("template");

File file = new File(PathKit.getWebRootPath() + templateName + "/setting/index.jsp");

if (file.exists()) {

setAttr("include", templateName + "/setting/index");

setAttr("template", templateName);

setAttr("menu", "1");

I18NUtil.addToRequest(PathKit.getWebRootPath() + templateName + "/language/", this);

String jsonStr = new WebSite().getValueByName(templateName + templateConfigSuffix);

fullTemplateSetting(jsonStr);

return "/admin/blank";

} else {

return Constants.ADMIN_NOT_FOUND_PAGE;

}

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:16,

示例14: clearStaticPostFileByLogId

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public boolean clearStaticPostFileByLogId(String id) {

Log log = Log.dao.findById(id);

if (log != null) {

File file = new File(PathKit.getWebRootPath() + "/post/" + id + ".html");

boolean delete = file.delete();

File aliasFile = new File(PathKit.getWebRootPath() + "/post/" + log.get("alias") + ".html");

boolean deleteAlias = aliasFile.delete();

return delete || deleteAlias;

}

return false;

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:12,

示例15: doGenerate

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public void doGenerate(String excludeTables) {

String modelPackage = basePackage;

String baseModelPackage = basePackage + ".base";

String modelDir = PathKit.getWebRootPath() + "/src/main/java/" + modelPackage.replace(".", "/");

String baseModelDir = PathKit.getWebRootPath() + "/src/main/java/" + baseModelPackage.replace(".", "/");

System.out.println("start generate...");

System.out.println("generate dir:" + modelDir);

List tableMetaList = CodeGenHelpler.createMetaBuilder().build();

CodeGenHelpler.excludeTables(tableMetaList, excludeTables);

new JbootBaseModelGenerator(baseModelPackage, baseModelDir).generate(tableMetaList);

new JbootModelnfoGenerator(modelPackage, baseModelPackage, modelDir).generate(tableMetaList);

System.out.println("model generate finished !!!");

}

開發者ID:yangfuhai,項目名稱:jboot,代碼行數:22,

示例16: JbootServiceInterfaceGenerator

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public JbootServiceInterfaceGenerator(String basePackage, String modelPacket) {

super(basePackage, PathKit.getWebRootPath() + "/src/main/java/" + basePackage.replace(".", "/"));

this.modelPacket = modelPacket;

this.basePackage = basePackage;

this.template = "io/jboot/codegen/service/service_template.jf";

}

開發者ID:yangfuhai,項目名稱:jboot,代碼行數:10,

示例17: scanSubClass

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public static List> scanSubClass(Class pclazz, boolean mustbeCanNewInstance) {

if (pclazz == null) {

log.error("scanClass: parent clazz is null");

return null;

}

List classFileList = new ArrayList();

scanClass(classFileList, PathKit.getRootClassPath());

List> classList = new ArrayList>();

for (File file : classFileList) {

int start = PathKit.getRootClassPath().length();

int end = file.toString().length() - 6; // 6 == ".class".length();

String classFile = file.toString().substring(start + 1, end);

Class clazz = classForName(classFile.replace(File.separator, "."));

if (clazz != null && pclazz.isAssignableFrom(clazz)) {

if (mustbeCanNewInstance) {

if (clazz.isInterface())

continue;

if (Modifier.isAbstract(clazz.getModifiers()))

continue;

}

classList.add(clazz);

}

}

File jarsDir = new File(PathKit.getWebRootPath() + "/WEB-INF/lib");

if (jarsDir.exists() && jarsDir.isDirectory()) {

File[] jarFiles = jarsDir.listFiles(new FileFilter() {

@Override

public boolean accept(File pathname) {

String name = pathname.getName().toLowerCase();

return name.endsWith(".jar") && name.startsWith("jpress");

}

});

if (jarFiles != null && jarFiles.length > 0) {

for (File f : jarFiles) {

classList.addAll(scanSubClass(pclazz, f, mustbeCanNewInstance));

}

}

}

return classList;

}

開發者ID:lusparioTT,項目名稱:OooO,代碼行數:50,

示例18: run

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public void run() {

try {

String warName;

String contextPath = JFinal.me().getServletContext().getContextPath();

String folderName;

if (contextPath.equals("/") || contextPath.equals("")) {

warName = "/ROOT.war";

folderName = "ROOT/";

} else {

warName = contextPath + ".war";

folderName = contextPath;

}

String filePath = System.getProperty("java.io.tmpdir") + File.separator + UUID.randomUUID().toString();

String backupFolder = new File(PathKit.getWebRootPath()).getParentFile().getParentFile() + File.separator + "backup" + File.separator + new SimpleDateFormat("yyyy-MM-dd_HH_mm").format(new Date()) + File.separator;

updateProcessMsg("曆史版本備份在 " + backupFolder);

new File(backupFolder).mkdirs();

FileUtils.moveOrCopy(new File(PathKit.getWebRootPath()).getParent() + File.separator + folderName, backupFolder, false);

FileUtils.moveOrCopy(new File(PathKit.getWebRootPath()).getParent() + File.separator + warName, backupFolder, false);

updateProcessMsg("生成臨時文件");

File tempFilePath = new File(filePath);

tempFilePath.mkdirs();

FileUtils.moveOrCopy(file.toString(), tempFilePath.getParentFile().toString(), false);

String tempFile = tempFilePath.getParentFile() + File.separator + file.getName();

ZipUtil.unZip(tempFile, filePath + File.separator);

updateProcessMsg("解壓完成");

List fileList = new ArrayList();

fileList.add(new File(filePath));

File tempWarFile = new File(tempFilePath.getParent() + File.separator + warName);

LOGGER.info(tempWarFile);

FileUtils.moveOrCopy(PathKit.getWebRootPath() + "/WEB-INF/db.properties", filePath + "/WEB-INF/", false);

FileUtils.moveOrCopy(PathKit.getWebRootPath() + "/WEB-INF/install.lock", filePath + "/WEB-INF/", false);

File templatePath = new File(PathKit.getWebRootPath() + Constants.TEMPLATE_BASE_PATH);

File[] templates = templatePath.listFiles();

if (templates != null && templates.length > 0) {

for (File template : templates) {

if (template.isDirectory() && template.toString().substring(PathKit.getWebRootPath().length()).equals(Constants.DEFAULT_TEMPLATE_PATH)) {

LOGGER.info("skip default template folder");

continue;

}

FileUtils.moveOrCopy(template.toString(), filePath + File.separator + Constants.TEMPLATE_BASE_PATH, false);

}

}

if (new File(PathKit.getWebRootPath() + "/attached").exists()) {

FileUtils.moveOrCopy(PathKit.getWebRootPath() + "/attached", filePath, false);

}

//使用係統提供的工具打包jar(.war)包,僅限有jdk可用。

//System.out.println(CmdUtil.sendCmd("jar ", "-cvf", tempWarFile.toString(),"-C "+ filePath + "/ ."));

JarPackageUtil.inJar(fileList, filePath + File.separator, tempWarFile.toString());

File finalFile = new File(new File(PathKit.getWebRootPath()).getParentFile() + warName);

updateProcessMsg("覆蓋安裝包文件");

finalFile.delete();

LOGGER.info("finalFile " + finalFile);

FileUtils.moveOrCopy(tempWarFile.toString(), finalFile.getParentFile().toString(), false);

} catch (Exception e) {

LOGGER.error("", e);

updateProcessErrorMsg(e);

}

finish = true;

}

開發者ID:94fzb,項目名稱:zrlog,代碼行數:60,

示例19: formatNews

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

@Override

protected String formatNews(List list) {

String result = "";

try {

String filePath = PathKit.getWebRootPath() + File.separator

+ "template" + File.separator + "email_notify_template.html";

if(new File(filePath).exists() == false)

filePath = "E:\\Server\\email_notify_template.html";

if(new File(filePath).exists() == false)

filePath = "/home/finnews/email_notify_template.html";

if(new File(filePath).exists() == false)

filePath = getClass().getClassLoader().getResource("email_notify_template.html").getPath();

String template = FileUtils.readFileToString(new File(filePath), "utf-8");

// 寫入關鍵字

String[] keywordArr = getKeywords();

String strKeyword = StringUtils.join(keywordArr, " ");

template = StringUtils.replace(template, "${KEYWORD}", strKeyword);

// 將關鍵字變紅

String[] redWordArr = new String[keywordArr.length];

for(int i = 0; i < keywordArr.length; i++) {

redWordArr[i] = "" + keywordArr[i] + "";

}

String templateStart = "";

String templateEnd = "";

int startIdx = template.indexOf(templateStart) + templateStart.length();

int endIdx = template.indexOf(templateEnd);

String templatePart = template.substring(startIdx, endIdx);

StringBuffer sbf = new StringBuffer();

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

for(News news : list) {

String temp = templatePart;

String title = news.getTitle();

String desc = news.getDescription();

title = StringUtils.replaceEach(title, keywordArr, redWordArr);

desc = StringUtils.replaceEach(desc, keywordArr, redWordArr);

List searchList = Lists.newArrayList("${LINK}", "${TITLE}", "${DESC}", "${UPDATE_TIME}", "${FROM}");

List replaceList = Lists.newArrayList(news.getNewsUrl(), title, desc, sdf.format(new Date(news.getDateTime())), news.getPubFrom());

temp = StringUtils.replaceEach(temp,

convertListAsStringArray(searchList),

convertListAsStringArray(replaceList));

sbf.append(temp + "\r\n");

}

result = sbf.toString();

result = template.substring(0, startIdx) + result + template.substring(endIdx);

if(MiscUtils.getHostName().contains("wenjun"))

FileUtils.write(new File("E:/mail.html"), result, "utf-8");

} catch (IOException e) {

e.printStackTrace();

}

return result;

}

開發者ID:RangerWolf,項目名稱:Finance-News-Helper,代碼行數:59,

示例20: config

​點讚 2

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public void config(){

String root = PathKit.getWebRootPath();

WebAppResourceLoader resourceLoader = new WebAppResourceLoader(root);

config(resourceLoader);

}

開發者ID:javamonkey,項目名稱:beetl2.0,代碼行數:6,

示例21: JbootServiceImplGenerator

​點讚 1

import com.jfinal.kit.PathKit; //導入方法依賴的package包/類

public JbootServiceImplGenerator(String basePackage, String modelPackage) {

super(basePackage + ".impl", PathKit.getWebRootPath() + "/src/main/java/" + (basePackage + ".impl").replace(".", "/"));

this.basePackage = basePackage;

this.modelPackage = modelPackage;

this.template = "io/jboot/codegen/service/service_impl_template.jf";

}

開發者ID:yangfuhai,項目名稱:jboot,代碼行數:10,

注:本文中的com.jfinal.kit.PathKit.getWebRootPath方法示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值