摘要: ###三大等待方式 ####硬性等待 thread.sleep(3000) ####隐式等待 //隐式等待,超时等待5秒,全局有效 webDriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); ####显示等待 //显示等待,直 阅读全文
posted @ 2022-07-20 22:48 小幼虫虫 阅读(17) 评论(0) 推荐(0) 编辑
摘要: (一)对浏览器的基本操作 System.setProperty("webdriver","C:\PromgramFiles\浏览器物理位置\firefox.exe");//设置默认浏览器。 WebDriver driver=new FirefoxDriver();//打开浏览器 driver.man 阅读全文
posted @ 2022-07-20 14:38 小幼虫虫 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 开启事务 connection.setAutoCommit(false); connection.close; 开启批处理 rewriteBatchedStatements=true https://blog.csdn.net/fengyuyeguirenenen/article/details/1 阅读全文
posted @ 2022-06-24 23:07 小幼虫虫 阅读(262) 评论(0) 推荐(0) 编辑
摘要: @Transactional(rollbackFor = Exception.class) 放在方法上 需要再方法里抛出异常,发生异常后,则回滚 阅读全文
posted @ 2022-06-11 18:03 小幼虫虫 阅读(17) 评论(0) 推荐(0) 编辑
摘要: //字符串转数组 String a = "1,2,3,4,5"; String[] A = a.split(","); for (String s : A) { System.out.println(s); } System.out.println(" "); //数组转数字 int resulet 阅读全文
posted @ 2022-05-25 17:02 小幼虫虫 阅读(88) 评论(0) 推荐(0) 编辑
摘要: ###接收属性 Object loginUser = request.getSession().getAttribute("loginUser"); ###发送属性 session.setAttribute("loginUser",userName); import org.springframew 阅读全文
posted @ 2022-05-19 21:00 小幼虫虫 阅读(57) 评论(0) 推荐(0) 编辑
摘要: ##1.提取公共页面 给提取部分取名 th:fragment="topbar" 添加提取部分 <!--引用dashboard的侧边导航栏--> <div th:insert="~{comment/comment::topbar(active='list.html')}"></div> 如果要传递参数 阅读全文
posted @ 2022-05-19 17:21 小幼虫虫 阅读(136) 评论(0) 推荐(0) 编辑
摘要: ##创建一个拦截器 import org.springframework.web.servlet.HandlerInterceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServl 阅读全文
posted @ 2022-05-19 15:26 小幼虫虫 阅读(110) 评论(0) 推荐(0) 编辑
摘要: ###创建springboot的web项目 可以创建一个config类,对应目录有对应的首页文件 import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.c 阅读全文
posted @ 2022-05-17 22:24 小幼虫虫 阅读(30) 评论(0) 推荐(0) 编辑
摘要: ##静态资源路径 源码: public void addResourceHandlers(ResourceHandlerRegistry registry) { if (!this.resourceProperties.isAddMappings()) { logger.debug("Default 阅读全文
posted @ 2022-05-17 14:28 小幼虫虫 阅读(76) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示