![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
羊驼是真的羊吗
这个作者很懒,什么都没留下…
展开
-
SpringSecurity多个AuthenticationManager登录验证
****1.根据百度一些demo,多番尝试以后能够使用。2.仅做记录,便于以后更好的改进和研究。原创 2022-06-13 15:02:06 · 1177 阅读 · 1 评论 -
使用HttpClient爬取数据
使用HttpClient爬取数据package com.ruoyi.web.controller;import org.apache.http.Consts;import org.apache.http.HttpEntity;import org.apache.http.HttpResponse;import org.apache.http.NameValuePair;import org.apache.http.client.config.RequestConfig;import org原创 2021-11-16 15:14:24 · 415 阅读 · 0 评论 -
使用easyexcel导入excel
//controller @GetMapping("/importExcel") public importExcel(@RequestParam("file") MultipartFile file){ service.import(file); }//servicevoid import(MultipartFile file);@Override public void import(MultipartFile file){ ExcelReader excelReader原创 2021-08-20 13:13:17 · 593 阅读 · 0 评论 -
snmpGet与snmpWalk
<!-- https://mvnrepository.com/artifact/org.snmp4j/snmp4j --> <dependency> <groupId>org.snmp4j</groupId> <artifactId>snmp4j</artifactId> <version>2.6.3</version> </depen...原创 2021-02-18 16:53:35 · 881 阅读 · 0 评论 -
根据传入的年份,周数取得相应日期
//需要获取周几的日期 private static final Integer whichDay = 7; public static String getSunday(int year, int week) { //注释部分根据自己需求,如果需要获取正确周则不需要该部分// DayOfWeek dayOfWeek = LocalDateTime.of(year, 1, 1, 0, 0).getDayOfWeek();// if (...原创 2021-01-15 16:58:06 · 285 阅读 · 0 评论 -
使用easyexcel上传并读取excel内容
public ResponseData readExcel(MultipartFile file) throws Exception { if (null == file) { throw new ServiceException(FILE_NOT_FOUND); } Sheet sheet = new Sheet(1, 1, ClanExcelVo.class); InputStream fileInputStrea.原创 2020-10-21 09:16:16 · 1851 阅读 · 1 评论 -
Springboot基于自定义注解的自动装配
1.定义java bean@Data //lombok注解public class User { private Integer userId; private String userName;}2.创建configuration类public class UserConfig { @Bean public User getUser(){ User user = new User(); user.setUserId(1);原创 2020-06-22 15:01:23 · 588 阅读 · 0 评论 -
springboot注解aop
@Aspect@Component@Slf4jpublic class AopController {@Before("within(com.tyzls.system.service.impl.*Impl)") public void beforeStart(JoinPoint joinPoint){ log.info("当前即将调用的类名:{}",joinPoint.getSignature().getName()); log.info("当前即将调用的方法名{}",jo原创 2020-06-10 08:59:58 · 145 阅读 · 0 评论 -
bootstrap+springboot获取勾选以后的值
1.获取勾选值function exportRow(){ table.set(); $.modal.confirm("确定导出选择的数据吗?", function() { var data = $("#" + table.options.id).bootstrapTable('getSelections'); var woNums = []; for(var i原创 2020-06-10 08:54:08 · 569 阅读 · 0 评论 -
记录springboot使用freemarker远程服务器导出word
此处参考了一个博主的本地导出图片,具体的地址如下:https://www.jianshu.com/p/956f56c2ddcf@RestControllerpublic class Controller { /** * @param photo 注意该photo参数为前台传过来图片 */ @GetMapping("/exportWord") public void exportWord(HttpServletResponse response){原创 2020-05-22 14:41:19 · 233 阅读 · 1 评论 -
banner.txt骷髅版本
Application Version: ${tyzls.version}Spring Boot Version: ${spring-boot.version} |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.| | ______ | | ...原创 2020-02-22 13:13:23 · 393 阅读 · 0 评论 -
ajax传集合或对象到后端
首先定义 对象 或 集合var list = [];var obj = {};将对象或集合转成json格式 var list or obj= JSON.stringify(list or obj );ajax data数据的处理data: { "patrolPlanSchedule":pp, "list":ll, ...原创 2020-02-20 17:30:27 · 553 阅读 · 0 评论 -
base64转MultipartFile
/** * base64转MultipartFile */public class BASE64DecodedMultipartFile implements MultipartFile { private final byte[] imgContent; private final String header; public BASE64DecodedMulti...原创 2020-02-19 15:59:13 · 3520 阅读 · 1 评论 -
lambda表达式得出2个yyyy-MM-dd日期间的所有日期
LocalDateTime now = LocalDateTime.now(); final LocalDateTime yuandan ; //如果当前日期在12/1之前 则生成当年的天数 if(now.isBefore(LocalDateTime.of(now.getYear() , 5, 1, 0, 0))) { yu...原创 2020-02-19 15:50:13 · 726 阅读 · 0 评论 -
使用generator自动生成映射文件
使用generator自动生成映射文件1.首先需要在pom.xml中添加依赖根据个人需求更改下图的路径以上就完成了pom.xml的配置。2.在resources下创建generator文件夹并创建generatorConfig.xml文件(注:此文件的路径需与上面配置路径相一致)3.在generatorConfig.xml添加如下内容注:需根据个人实际情况更改相应内容4.在i...原创 2019-06-05 17:46:43 · 414 阅读 · 0 评论