基于javaweb和mysql的ssm美食论坛系统(java+ssm+jsp+jquery+layui+mysql)

私信源码获取及调试交流

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb的SSM美食论坛系统(java+ssm+jsp+jquery+layui+mysql)

项目介绍

该项目主要分为前台与后台; 前台主要功能包括: 登录、注册;首页、我发表的贴子、意见建议;版块列表、帖子查看、发贴回贴等; 普通用户登录后,主要功能有: 我的主页、用户中心、基本设置、版主申请、我的关注、屏蔽用户、我的私信等; 后台主要功能包括: 会员管理:禁言、封号、删除等; 站内资讯:添加、编辑、删除等; 友情链接:添加、编辑、删除等; 版块管理:添加修改删除分类、撤销版主等; 帖子管理:迁移、精华、置顶、删除等; 版主审核:通过、拒绝等; 意见建议:回复、删除; 敏感字符:添加、编辑、删除敏感字符; 举报信息:查看被举报人、举报人、举报原因等;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7版本;

技术栈

  1. 后端:Spring SpringMVC MyBatis 2. 前端:JSP+jQuery+LayUI

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入http://localhost:8080/cateforumssm 登录
			List<Bbstype> stypelist = bbstypeDAO.selectChildtype(Integer.parseInt(fid));
			String optionstr = "";
			for(Bbstype bbstype:stypelist){
				optionstr +="<option value="+bbstype.getId()+">"+bbstype.getTypename()+"</option>";
			}
			//System.out.println("optionstr==="+optionstr);
			out.print(optionstr);
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
	//撤消版主
	@RequestMapping("admin/bzDel")
	public void bzDel(Banzhu banzhu, HttpServletRequest request,HttpServletResponse response) {
		try {
			banzhuDAO.delete(banzhu);
			PrintWriter out = response.getWriter();
			out.print(0);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}

	@RequestMapping("bzApply")
	public String bzApply(HttpServletRequest request) {
		Member member = (Member)request.getSession().getAttribute("member");
		String index = request.getParameter("index");
	   	int pageindex = 1;
	   	if(index!=null){
	   		 pageindex = Integer.parseInt(index);
	   	}
   	    Page<Object> page = PageHelper.startPage(pageindex,6);
		List<Bzapplyrecord> list = bzapplyrecordDAO.selectMybzapply(member.getId());
		for(Bzapplyrecord bzapplyrecord:list){
			Bbstype bbstype = bbstypeDAO.findById(bzapplyrecord.getFid());
			bzapplyrecord.setFtype(bbstype);
		}
		request.setAttribute("list", list);
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
		return "bzapply";
	}
	
	//得到版块类别到申请版主添加页面
	@RequestMapping("bzapplyShowbbstype")
	public String bzapplyShowbbstype(HttpServletRequest request) {
		Member member = (Member)request.getSession().getAttribute("member");
		if(member!=null){
			List<Bbstype> list = bbstypeDAO.selectAll();
			request.setAttribute("list", list);
			request.setAttribute("member", member);
			return "bzapplyadd";
		}else{
			return "login";
		}
	}
	
	//添加版主申请
	@RequestMapping("applyAdd")
	public void applyAdd(HttpServletRequest request,HttpServletResponse response) {
		try {
			String msgstr = "";
			String fid = request.getParameter("fid");

            while (rs.next()) {
                HashMap map = new HashMap();
                int i = rsmd.getColumnCount();
                for (int j = 1; j <= i; j++) {
                    if (!rsmd.getColumnName(j).equals("ID")) {
                        String str = rs.getString(j) == null ? "" : rs.getString(j);
                        if (str.equals("null")) str = "";
                        map.put(rsmd.getColumnName(j), str);
                    } else
                        map.put("id", rs.getString(j));
                }
                list.add(map);
            }
            rs.close();
            st.close();
        } catch (SQLException e) {
            // TODO Auto-generated catch block

            if (sql.equals("show tables"))
                list = select("select table_name from   INFORMATION_SCHEMA.tables");
            else
                e.printStackTrace();
        }
        return list;
    }

    public List<List> selectforlist(String sql) {
        List<List> list = new ArrayList();
        try {
            Statement st = conn.createStatement();
            ResultSet rs = st.executeQuery(sql);
            ResultSetMetaData rsmd = rs.getMetaData();

            while (rs.next()) {
                List<String> list2 = new ArrayList();
                int i = rsmd.getColumnCount();
                for (int j = 1; j <= i; j++) {
                    if (!rsmd.getColumnName(j).equals("ID")) {
                        String str = rs.getString(j) == null ? "" : rs.getString(j);
                        if (str.equals("null")) str = "";
                        list2.add(str);
                    } else
                        list2.add(rs.getString(j));
                }
                list.add(list2);
            }
            rs.close();
            st.close();
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
		return "admin/bbstypesearch";
	}
	
	//ajax查找子类
	@RequestMapping("admin/searchBbstype")
	public void searchBbstype(HttpServletRequest request,HttpServletResponse response) {
		try {
			response.setContentType("text/html;charset=utf-8");
			PrintWriter out = response.getWriter();
			String fid = request.getParameter("fid");
			
			List<Bbstype> stypelist = bbstypeDAO.selectChildtype(Integer.parseInt(fid));
			String optionstr = "";
			for(Bbstype bbstype:stypelist){
				optionstr +="<option value="+bbstype.getId()+">"+bbstype.getTypename()+"</option>";
			}
			//System.out.println("optionstr==="+optionstr);
			out.print(optionstr);
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
	//撤消版主
	@RequestMapping("admin/bzDel")
	public void bzDel(Banzhu banzhu, HttpServletRequest request,HttpServletResponse response) {
		try {
			banzhuDAO.delete(banzhu);
			PrintWriter out = response.getWriter();
			out.print(0);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
    public void delete(HttpServletRequest request, String tablename) {
        int i = 0;
        try {
            String did = request.getParameter("did");
            if (did == null) did = request.getParameter("scid");
            if (did != null) {
                if (did.length() > 0) {
                    Statement st = conn.createStatement();
                    st.execute("delete from " + tablename + " where id=" + did);
                    st.close();
                }
            }

        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    public String getCols(String table) {
        String str = "";
        Connection conn = this.getConn();
        try {
            Statement st = conn.createStatement();
            ResultSet rs = st.executeQuery("select * from " + table);
            ResultSetMetaData rsmd = rs.getMetaData();

            int i = rsmd.getColumnCount();
            for (int j = 2; j <= i; j++) {
                str += rsmd.getColumnName(j) + ",";
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        str = str.substring(0, str.length() - 1);

        return str;
    }

    public String update(HttpServletRequest request, HttpServletResponse response, String tablename, HashMap extmap, boolean alert, boolean reflush) {
        if (request.getParameter("f") != null) {
            Enumeration enumeration = request.getParameterNames();
            String names = ",";
            while (enumeration.hasMoreElements()) {
                names += enumeration.nextElement().toString() + ",";
            }
	
	//设置帖子能否回贴
	@RequestMapping("admin/isCanht")
	public String isCanht(HttpServletRequest request) {
		String id = request.getParameter("id");
		Tzinfo tzinfo  = (Tzinfo)tzinfoDAO.findById(Integer.parseInt(id));
		if(tzinfo.getCanht().equals("yes")){
			tzinfo.setCanht("no");
		}else{
			tzinfo.setCanht("yes");
		}
		tzinfo.setId(Integer.parseInt(id));
		tzinfoDAO.updateCanht(tzinfo);
		return "redirect:tzinfoList.do";
	}
	
	

}

@Controller
public class MemberController extends BaseController {
        }
        return (int) dayNumber;
    }

    public static void main(String[] g) {
    }

    public static String getselect(String name, String tablename, String zdname) {
        String select = "<select name=\"" + name + "\" id=\"" + name + "\" >";
        for (HashMap permap : new CommDAO().select("select * from " + tablename + " order by id desc")) {
            select += "<option value=\"" + permap.get(zdname) + "\">" + permap.get(zdname) + "</option>";
        }
        select += "</select>";
        return select;
    }

    public static String getselect(String name, String tablename, String zdname, String where) {

        String select = "<select name=\"" + name + "\" id=\"" + name + "\" >";
        select += "<option value=\"\">不限</option>";
        for (HashMap permap : new CommDAO().select("select * from " + tablename + " where " + where + " order by id desc")) {
            String optionstr = "";

            if (zdname.split(";").length == 1) {

                optionstr = permap.get(zdname.split("~")[0]).toString();

            } else {
                for (String str : zdname.split(";")) {
                    String zdstr = str.split("~")[0];
                    String zdnamestr = str.split("~")[1].equals("无名") ? "" : (str.split("~")[1] + ":");
                    optionstr += zdnamestr + permap.get(zdstr) + " - ";
                }
            }

            if (optionstr.indexOf(" - ") > -1) optionstr = optionstr.substring(0, optionstr.length() - 3);
            select += "<option value=\"" + optionstr + "\">" + optionstr + "</option>";
        }
        select += "</select>";
        return select;
    }

    public static String getradio(String name, String tablename, String zdname, String where) {
        String radio = "";
            if (optionstr.length() > 0) optionstr = optionstr.substring(0, optionstr.length() - 3);

            checkbox += "<label><input type='checkbox' name='" + name + "' value=\"" + optionstr + "\">" + optionstr + "</label>\n";
        }
        checkbox += "<input type=hidden name='" + name + "' value='' />";
        return checkbox;
    }

    public static String getcheckboxDk(String name, String tablename, String zdname, String nstr, String where) {
        String checkbox = "";
        int i = 0;
        for (HashMap permap : new CommDAO().select("select * from " + tablename + " where " + where + " order by id desc")) {

            String optionstr = "";
            for (String str : zdname.split(";")) {
                String zdstr = str.split("~")[0];
                String zdnamestr = str.split("~")[1].equals("无名") ? "" : (str.split("~")[1] + ":");
                optionstr += zdnamestr + permap.get(zdstr) + " - ";
            }
            if (optionstr.length() > 0) optionstr = optionstr.substring(0, optionstr.length() - 3);
            String nbs = "";
            if (i > 0) nbs = "&nbsp;";
            checkbox += "<label>" + nbs + "<input type='checkbox' name='" + name + "' value=\"" + optionstr + "\">" + optionstr + "</label>&nbsp;&nbsp;\n";
            checkbox += "<label>&nbsp;- " + nstr + " &nbsp;<input type='text' size='5' name='" + optionstr + "' value=\"\"></label><br />\n";
            i++;
        }
        checkbox += "<input type=hidden name='" + name + "' value='' /><input type=hidden name='dk-" + name + "-value' value='" + nstr + "' />";
        return checkbox;
    }

    public static String getFileUpInfo() {
        String jscode = "";
        jscode += "<font onclick=\"uploaddoc()\" src=\"js/nopic.jpg\" style='cursor:hand' id=txt >点击此处上传</font>";
        jscode += "&nbsp;&nbsp;<input type=text readonly style='border:0px' size=30  name=\"docname\" id=\"docname\" value=\"\" />";
        return jscode;
    }

    public static String tform(HashMap map) {
        String jscode = "";
        try {
            jscode += "<script type=\"text/javascript\">\n";
            jscode += "function getPvalue()\n";
            jscode += "{\n";

            Set set = map.entrySet();
            Iterator it = set.iterator();
            while (it.hasNext()) {
                String pm = ((Object) it.next()).toString();
                String str1 = "";
                String str2 = "";
		
		
		String index = request.getParameter("index");
	   	int pageindex = 1;
	   	if(index!=null){
	   		 pageindex = Integer.parseInt(index);
	   	}
   	    Page<Object> page = PageHelper.startPage(pageindex,6);
		List<Tzinfo> list = tzinfoDAO.searchQ(key);
		//System.out.println("list===="+list.size());
		for(Tzinfo tzinfo:list){
			Member author = memberDAO.findById(tzinfo.getAuthor());
			Bbstype ftype = bbstypeDAO.findById(tzinfo.getFid());
			Bbstype stype = bbstypeDAO.findById(tzinfo.getSid());
			List<Tzhtinfo> allhtlist = tzhtinfoDAO.selectHtinfo(tzinfo.getId());
			tzinfo.setAllhtlist(allhtlist);
			
			tzinfo.setStype(stype);
			tzinfo.setFtype(ftype);
			tzinfo.setMember(author);
		}
		request.setAttribute("list", list);
		request.setAttribute("key", key);
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
		return "search";
	}

}


@Controller
public class SxinfoController extends BaseController {
	@Resource
	SxinfoDAO sxinfoDAO;
	@Resource
	MemberDAO memberDAO;
	

@Controller
public class PbinfoController extends BaseController {
	@Resource
	PbinfoDAO pbinfoDAO;
	@Resource
	MemberDAO memberDAO;
	
	
	//屏蔽
	@RequestMapping("pbinfoAdd")
	public void pbinfoAdd(HttpServletRequest request,HttpServletResponse response){
		try {
			String memberid = request.getParameter("memberid");
			String pbmemberid = request.getParameter("pbmemberid");
			Pbinfo pbinfo = new Pbinfo();
			pbinfo.setMemberid(Integer.parseInt(memberid));
			pbinfo.setPbmemberid(Integer.parseInt(pbmemberid));
			pbinfoDAO.add(pbinfo);
			PrintWriter out = response.getWriter();
			out.print(0);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
	//取消屏蔽
	@RequestMapping("pbinfoDel")
	public void pbinfoDel(HttpServletRequest request,HttpServletResponse response){
		try {
			String memberid = request.getParameter("memberid");
			String pbmemberid = request.getParameter("pbmemberid");
			HashMap<String,String> map = new HashMap<String, String>();
			map.put("memberid", memberid);
			map.put("pbmemberid", pbmemberid);
			Pbinfo pbinfo = pbinfoDAO.selectOne(map).get(0);
			pbinfoDAO.delete(pbinfo);
			PrintWriter out = response.getWriter();
			out.print(0);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	//我的屏蔽
	@RequestMapping("myPingbi")
	public String myPingbi(HttpServletRequest request) {
   	    Page<Object> page = PageHelper.startPage(pageindex,6);
		List<Yqlink> list = yqlinkDAO.selectAll();
		request.setAttribute("list", list);
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
		return "admin/yqlinklist";
	}
	
	//添加友情链接
	@RequestMapping("admin/yqlinkAdd")
	public String yqlinkAdd(Yqlink yqlink, HttpServletRequest request) {
		yqlinkDAO.add(yqlink);	
		return "redirect:yqlinkList.do";
	}
	
	//显示友情链接信息
	@RequestMapping("admin/yqlinkShow")
	public String yqlinkShow(int id, HttpServletRequest request) {
		Yqlink yqlink = yqlinkDAO.findById(id);
		request.setAttribute("yqlink", yqlink);
		return "admin/yqlinkedit";
	}
	
	//编辑友情链接
	@RequestMapping("admin/yqlinkEdit")
	public String yqlinkEdit(Yqlink yqlink, HttpServletRequest request) {
		yqlinkDAO.update(yqlink);
		return "redirect:yqlinkList.do";
	}
	
	//删除类别
	@RequestMapping("admin/yqlinkDel")
	public String yqlinkDel(int id, HttpServletRequest request) {
		yqlinkDAO.delete(id);
		return "redirect:yqlinkList.do";
	}
	
	//搜索类别
	@RequestMapping("admin/searchYqlink")
	public String searchYqlink(HttpServletRequest request) {
		String index = request.getParameter("index");
		String key = request.getParameter("key");
	   	int pageindex = 1;
		try {
			tzhtinfoDAO.delHt(id);
			PrintWriter out = response.getWriter();
			out.print(id);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	
	//我回复的贴子
	@RequestMapping("myHf")
	public String myHf(HttpServletRequest request){
		Member m = (Member)request.getSession().getAttribute("member");
		if(m!=null){
		List<Tzinfo> publishlist = tzinfoDAO.myTzinfo(m.getId());
		String index = request.getParameter("index");
	   	int pageindex = 1;
	   	if(index!=null){
	   		 pageindex = Integer.parseInt(index);
	   	}
   	    Page<Object> page = PageHelper.startPage(pageindex,6);
		List<Tzhtinfo> list = tzhtinfoDAO.selectNorepetition(m.getId());
		for(Tzhtinfo tzhtinfo:list){
			Tzinfo tzinfo = tzinfoDAO.findById(tzhtinfo.getTzid());
			List<Tzhtinfo> htlist = tzhtinfoDAO.selectHtinfo(tzinfo.getId());
			tzinfo.setAllhtlist(htlist);
			Bbstype ftype = bbstypeDAO.findById(tzinfo.getFid());
			tzhtinfo.setFtype(ftype);
			tzhtinfo.setTzinfo(tzinfo);
		}
		request.setAttribute("list", list);
		request.setAttribute("publishlist", publishlist);
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
			return "myhf";
		}else{
			return "login";
		}
	}
	

}

@Controller
public class NewsController extends BaseController {
	@Resource
	NewsDAO newsDAO;
	@Resource
	MemberDAO memberDAO;
	@Resource
	BbstypeDAO bbstypeDAO;
	@Resource
	YqlinkDAO yqlinkDAO;
	@Resource
	TzinfoDAO tzinfoDAO;
	
	//后台新闻列表
	@RequestMapping("admin/newsList")
	public String newsList(HttpServletRequest request) {
		String index = request.getParameter("index");
	   	int pageindex = 1;
	   	if(index!=null){
	   		 pageindex = Integer.parseInt(index);
	   	}
   	    Page<Object> page = PageHelper.startPage(pageindex,6);
		List<News> list = newsDAO.selectAll();
		request.setAttribute("list", list);
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
		return "admin/newslist";
	}
	
	//后台搜索新闻列表
	@RequestMapping("admin/searchNews")
	public String searchNews(HttpServletRequest request) {
	 *
	 * This method is called when a form has its tag value method equals to post.
	 * 
	 * @param request the request send by the client to the server
	 * @param response the response send by the server to the client
	 * @throws ServletException if an error occurred
	 * @throws IOException if an error occurred
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		StringBuffer   sb   =   new   StringBuffer(50);   
		 response.setContentType("application/x-msdownload;charset=GB2312");   
        try {
			response.setHeader("Content-Disposition",   new   String(sb.toString()   
			         .getBytes(),   "ISO8859-1"));
		} catch (UnsupportedEncodingException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		 String filename = request.getParameter("filename");
		  if (request.getHeader("User-Agent").toLowerCase().indexOf("firefox") > 0){
		     try {
				filename = new String(filename.getBytes("UTF-8"), "ISO8859-1");
			} catch (UnsupportedEncodingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		 }
		 else 
		      if (request.getHeader("User-Agent").toUpperCase().indexOf("MSIE") > 0){
		           try {
					filename = URLEncoder.encode(filename, "UTF-8");
				} catch (UnsupportedEncodingException e) {
					// TODO Auto-generated catch block
					 
				}
		      }
		 response.setContentType("text/plain");
		 response.setHeader("Location",filename);
		 response.reset();
		 response.setHeader("Cache-Control", "max-age=0" );
		 response.setHeader("Content-Disposition", "attachment; filename=" + filename);
		   

		    try {
   	    Page<Object> page = PageHelper.startPage(pageindex,6);
		List<Member> list = memberDAO.searchKey(key);
		request.setAttribute("key", key);
		request.setAttribute("list", list);
		request.setAttribute("index", page.getPageNum());
		request.setAttribute("pages", page.getPages());
		request.setAttribute("total", page.getTotal());
		return "admin/membersearch";
	}
	
	//会员审核
	@RequestMapping("admin/shStatus")
	public String shStatus(HttpServletRequest request){
		String type = request.getParameter("type");
		String id = request.getParameter("id");
		if(type.equals("tg")){
			memberDAO.updateTgShstatus(Integer.parseInt(id));
		}else if(type.equals("jj")){
			memberDAO.updateJjShstatus(Integer.parseInt(id));
		}
		return "redirect:memberList.do";
	}
	
	//删除会员
	@RequestMapping("admin/memberDel")
	public String memberDel(int id,HttpServletRequest request){
		memberDAO.delete(id);
		return "redirect:memberList.do";
	}
	
	//会员禁言
	@RequestMapping("admin/jinYan")
	public void jinYan(int id, HttpServletRequest request,HttpServletResponse response) {
		try {
			memberDAO.updateIsjy(id);
			PrintWriter out = response.getWriter();
			out.print(0);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	
	//禁言解除
	@RequestMapping("admin/jinyanJc")
	public void jinyanJc(int id, HttpServletRequest request,HttpServletResponse response) {
		try {
			memberDAO.updateNojy(id);
    }

    /**
     * 过滤html代码
     */
    public static String filterStrIgnoreCase(String source, String from, String to) {
        String sourceLowcase = source.toLowerCase();
        String sub1, sub2, subLowcase1, subLowcase2;
        sub1 = sub2 = subLowcase1 = subLowcase2 = "";
        int start = 0, end;
        boolean done = true;
        if (source == null) return null;
        if (from == null || from.equals("") || to == null || to.equals(""))
            return source;
        while (done) {
            start = sourceLowcase.indexOf(from, start);
            if (start == -1) {
                break;
            }
            subLowcase1 = sourceLowcase.substring(0, start);
            sub1 = source.substring(0, start);
            end = sourceLowcase.indexOf(to, start);
            if (end == -1) {
                end = sourceLowcase.indexOf("/>", start);
                if (end == -1) {
                    done = false;
                }
            } else {
                end = end + to.length();
                subLowcase2 = sourceLowcase.substring(end, source.length());
                sub2 = source.substring(end, source.length());
                sourceLowcase = subLowcase1 + subLowcase2;
                source = sub1 + sub2;
            }
            //System.out.println(start+" "+end);
        }
        return source;
    }

    public static void delPic(String path, String img) {
        if (img != null) {
            if (!img.equals("")) {
                File file1 = new File(path + "/" + img);
                if (file1.exists()) {
                    file1.deleteOnExit();
                    //file1.delete();
                }
            }
        }
    }

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐