随笔分类 -  实际项目开发常用

摘要:一、引入相应云平台SDK <dependency> <groupId>com.qiniu</groupId> <artifactId>qiniu-java-sdk</artifactId> <version>${qiniu.version}</version> </dependency> <depe 阅读全文
posted @ 2021-07-07 16:47 潜跃 阅读(449) 评论(0) 推荐(0)
摘要:@Configuration public class ScheduleConfig { @Bean public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) { SchedulerFactoryBean fact 阅读全文
posted @ 2021-07-07 16:14 潜跃 阅读(276) 评论(0) 推荐(0)
摘要:public class TokenGenerator { public static String generateValue() { return generateValue(UUID.randomUUID().toString()); } private static final char[] 阅读全文
posted @ 2021-07-07 16:11 潜跃 阅读(420) 评论(0) 推荐(0)
摘要:public class PageUtils implements Serializable { //定义程序序列化ID private static final long serialVersionUID = 1L; /** * 总记录数 */ private int totalCount; /* 阅读全文
posted @ 2021-07-07 16:06 潜跃 阅读(1765) 评论(0) 推荐(0)
摘要:public class ShiroUtils { public static Session getSession() { return SecurityUtils.getSubject().getSession(); } public static Subject getSubject() { 阅读全文
posted @ 2021-07-07 16:04 潜跃 阅读(314) 评论(0) 推荐(0)
摘要:@Component public class RedisUtils { @Autowired private RedisTemplate<String, Object> redisTemplate; @Autowired private ValueOperations<String, String 阅读全文
posted @ 2021-07-07 16:03 潜跃 阅读(1700) 评论(0) 推荐(0)
摘要:public class IPUtils { private static Logger logger = LoggerFactory.getLogger(IPUtils.class); /** * 获取IP地址 * * 使用Nginx等反向代理软件, 则不能通过request.getRemoteA 阅读全文
posted @ 2021-07-07 13:34 潜跃 阅读(46) 评论(0) 推荐(0)
摘要:/** * Copyright (c) 2016-2019 人人开源 All rights reserved. * * https://www.renren.io * * 版权所有,侵权必究! */ package io.renren.common.utils; import org.apache. 阅读全文
posted @ 2021-07-07 13:29 潜跃 阅读(93) 评论(0) 推荐(0)
摘要:@Configuration public class RedisConfig { @Autowired private RedisConnectionFactory factory; @Bean public RedisTemplate<String, Object> redisTemplate( 阅读全文
posted @ 2021-07-07 11:43 潜跃 阅读(288) 评论(0) 推荐(0)
摘要:@Configuration public class ShiroConfig { @Bean("securityManager") public SecurityManager securityManager(OAuth2Realm oAuth2Realm) { DefaultWebSecurit 阅读全文
posted @ 2021-07-07 11:41 潜跃 阅读(311) 评论(0) 推荐(0)
摘要:@Configuration @EnableSwagger2 public class SwaggerConfig implements WebMvcConfigurer { @Bean public Docket createRestApi() { return new Docket(Docume 阅读全文
posted @ 2021-07-07 11:38 潜跃 阅读(338) 评论(0) 推荐(0)
摘要:@Configuration public class KaptchaConfig { @Bean public DefaultKaptcha producer() { Properties properties = new Properties(); properties.put("kaptcha 阅读全文
posted @ 2021-07-07 11:28 潜跃 阅读(72) 评论(0) 推荐(0)
摘要:@Configuration public class CorsConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMappin 阅读全文
posted @ 2021-07-07 11:25 潜跃 阅读(169) 评论(0) 推荐(0)