🎨 规范注释风格

This commit is contained in:
Yangkai.Shen 2020-10-25 11:27:29 +08:00
parent ca87bd0860
commit f56236a966
471 changed files with 1183 additions and 3442 deletions

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动器
* </p>
*
* @package: com.xkcoding.activiti
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2019-03-31 22:24
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-31 22:24
*/
@SpringBootApplication
public class SpringBootDemoActivitiApplication {

View File

@ -21,13 +21,8 @@ import java.util.stream.Collectors;
* 安全配置类
* </p>
*
* @package: com.xkcoding.activiti.config
* @description: 安全配置类
* @author: yangkai.shen
* @date: Created in 2019-07-01 18:40
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-07-01 18:40
*/
@Slf4j
@Configuration

View File

@ -17,13 +17,8 @@ import java.util.Collection;
* 认证工具
* </p>
*
* @package: com.xkcoding.activiti.util
* @description: 认证工具
* @author: yangkai.shen
* @date: Created in 2019-07-01 18:38
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-07-01 18:38
*/
@Component
@RequiredArgsConstructor(onConstructor_ = @Autowired)

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动类
* </p>
*
* @package: com.xkcoding.actuator
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/9/29 2:27 PM
* @copyright: Copyright (c)2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-9-29 14:27
*/
@SpringBootApplication
public class SpringBootDemoActuatorApplication {

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动类
* </p>
*
* @package: com.xkcoding.admin.client
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/10/8 2:16 PM
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-10-8 14:16
*/
@SpringBootApplication
public class SpringBootDemoAdminClientApplication {

View File

@ -8,13 +8,8 @@ import org.springframework.web.bind.annotation.RestController;
* 首页
* </p>
*
* @package: com.xkcoding.admin.client.controller
* @description: 首页
* @author: yangkai.shen
* @date: Created in 2018/10/8 2:15 PM
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-10-08 14:15
*/
@RestController
public class IndexController {

View File

@ -68,13 +68,8 @@
* 启动类
* </p>
*
* @package: com.xkcoding.admin.server
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/10/8 2:08 PM
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-10-08 14:08
*/
@EnableAdminServer
@SpringBootApplication

View File

@ -9,13 +9,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动类
* </p>
*
* @package: com.xkcoding.admin.server
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/10/8 2:08 PM
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-10-08 14:08
*/
@EnableAdminServer
@SpringBootApplication

View File

@ -90,13 +90,8 @@ spring:
* 启动器
* </p>
*
* @package: com.xkcoding.async
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-12-29 10:28
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-29 10:28
*/
@EnableAsync
@SpringBootApplication
@ -117,13 +112,8 @@ public class SpringBootDemoAsyncApplication {
* 任务工厂
* </p>
*
* @package: com.xkcoding.async.task
* @description: 任务工厂
* @author: yangkai.shen
* @date: Created in 2018-12-29 10:37
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-29 10:37
*/
@Component
@Slf4j
@ -193,13 +183,8 @@ public class TaskFactory {
* 测试任务
* </p>
*
* @package: com.xkcoding.async.task
* @description: 测试任务
* @author: yangkai.shen
* @date: Created in 2018-12-29 10:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-29 10:49
*/
@Slf4j
public class TaskFactoryTest extends SpringBootDemoAsyncApplicationTests {
@ -269,4 +254,4 @@ public class TaskFactoryTest extends SpringBootDemoAsyncApplicationTests {
## 参考
- Spring Boot 异步任务线程池的配置 参考官方文档https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#boot-features-task-execution-scheduling
- Spring Boot 异步任务线程池的配置 参考官方文档https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#boot-features-task-execution-scheduling

View File

@ -9,13 +9,8 @@ import org.springframework.scheduling.annotation.EnableAsync;
* 启动器
* </p>
*
* @package: com.xkcoding.async
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-12-29 10:28
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-29 10:28
*/
@EnableAsync
@SpringBootApplication

View File

@ -13,13 +13,8 @@ import java.util.concurrent.TimeUnit;
* 任务工厂
* </p>
*
* @package: com.xkcoding.async.task
* @description: 任务工厂
* @author: yangkai.shen
* @date: Created in 2018-12-29 10:37
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-29 10:37
*/
@Component
@Slf4j

View File

@ -13,13 +13,8 @@ import java.util.concurrent.Future;
* 测试任务
* </p>
*
* @package: com.xkcoding.async.task
* @description: 测试任务
* @author: yangkai.shen
* @date: Created in 2018-12-29 10:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-29 10:49
*/
@Slf4j
public class TaskFactoryTest extends SpringBootDemoAsyncApplicationTests {
@ -58,4 +53,4 @@ public class TaskFactoryTest extends SpringBootDemoAsyncApplicationTests {
log.info("同步任务全部执行结束,总耗时:{} 毫秒", (end - start));
}
}
}

View File

@ -84,13 +84,8 @@
* 启动类
* </p>
*
* @package: com.xkcoding.cache.ehcache
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/11/16 17:02
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 17:02
*/
@SpringBootApplication
@EnableCaching
@ -165,13 +160,8 @@ logging:
* UserService
* </p>
*
* @package: com.xkcoding.cache.ehcache.service.impl
* @description: UserService
* @author: yangkai.shen
* @date: Created in 2018/11/16 16:54
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 16:54
*/
@Service
@Slf4j
@ -240,13 +230,8 @@ public class UserServiceImpl implements UserService {
* ehcache缓存测试
* </p>
*
* @package: com.xkcoding.cache.ehcache.service
* @description: ehcache缓存测试
* @author: yangkai.shen
* @date: Created in 2018/11/16 16:58
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 16:58
*/
@Slf4j
public class UserServiceTest extends SpringBootDemoCacheEhcacheApplicationTests {
@ -298,4 +283,4 @@ public class UserServiceTest extends SpringBootDemoCacheEhcacheApplicationTests
- Ehcache 官网http://www.ehcache.org/documentation/
- Spring Boot 官方文档https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#boot-features-caching-provider-ehcache2
- 博客https://juejin.im/post/5b308de9518825748b56ae1d
- 博客https://juejin.im/post/5b308de9518825748b56ae1d

View File

@ -9,13 +9,8 @@ import org.springframework.cache.annotation.EnableCaching;
* 启动类
* </p>
*
* @package: com.xkcoding.cache.ehcache
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/11/16 17:02
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 17:02
*/
@SpringBootApplication
@EnableCaching

View File

@ -11,13 +11,8 @@ import java.io.Serializable;
* 用户实体
* </p>
*
* @package: com.xkcoding.cache.ehcache.entity
* @description: 用户实体
* @author: yangkai.shen
* @date: Created in 2018/11/16 16:53
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 16:53
*/
@Data
@AllArgsConstructor

View File

@ -7,13 +7,8 @@ import com.xkcoding.cache.ehcache.entity.User;
* UserService
* </p>
*
* @package: com.xkcoding.cache.ehcache.service
* @description: UserService
* @author: yangkai.shen
* @date: Created in 2018/11/16 16:53
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 16:53
*/
public interface UserService {
/**

View File

@ -16,13 +16,8 @@ import java.util.Map;
* UserService
* </p>
*
* @package: com.xkcoding.cache.ehcache.service.impl
* @description: UserService
* @author: yangkai.shen
* @date: Created in 2018/11/16 16:54
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 16:54
*/
@Service
@Slf4j

View File

@ -11,13 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
* ehcache缓存测试
* </p>
*
* @package: com.xkcoding.cache.ehcache.service
* @description: ehcache缓存测试
* @author: yangkai.shen
* @date: Created in 2018/11/16 16:58
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-16 16:58
*/
@Slf4j
public class UserServiceTest extends SpringBootDemoCacheEhcacheApplicationTests {
@ -62,4 +57,4 @@ public class UserServiceTest extends SpringBootDemoCacheEhcacheApplicationTests
// 删除查看ehcache是否存在缓存数据
userService.delete(1L);
}
}
}

View File

@ -124,13 +124,8 @@ logging:
* redis配置
* </p>
*
* @package: com.xkcoding.cache.redis.config
* @description: redis配置
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:41
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:41
*/
@Configuration
@AutoConfigureAfter(RedisAutoConfiguration.class)
@ -171,13 +166,8 @@ public class RedisConfig {
* UserService
* </p>
*
* @package: com.xkcoding.cache.redis.service.impl
* @description: UserService
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:45
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:45
*/
@Service
@Slf4j
@ -255,13 +245,8 @@ public class UserServiceImpl implements UserService {
* Redis测试
* </p>
*
* @package: com.xkcoding.cache.redis
* @description: Redis测试
* @author: yangkai.shen
* @date: Created in 2018/11/15 17:17
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 17:17
*/
@Slf4j
public class RedisTest extends SpringBootDemoCacheRedisApplicationTests {
@ -306,13 +291,8 @@ public class RedisTest extends SpringBootDemoCacheRedisApplicationTests {
* Redis - 缓存测试
* </p>
*
* @package: com.xkcoding.cache.redis.service
* @description: Redis - 缓存测试
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:53
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:53
*/
@Slf4j
public class UserServiceTest extends SpringBootDemoCacheRedisApplicationTests {
@ -364,4 +344,4 @@ public class UserServiceTest extends SpringBootDemoCacheRedisApplicationTests {
- spring-data-redis 官方文档https://docs.spring.io/spring-data/redis/docs/2.0.1.RELEASE/reference/html/
- redis 文档https://redis.io/documentation
- redis 中文文档http://www.redis.cn/commands.html
- redis 中文文档http://www.redis.cn/commands.html

View File

@ -22,13 +22,8 @@ import java.io.Serializable;
* redis配置
* </p>
*
* @package: com.xkcoding.cache.redis.config
* @description: redis配置
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:41
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:41
*/
@Configuration
@AutoConfigureAfter(RedisAutoConfiguration.class)

View File

@ -11,13 +11,8 @@ import java.io.Serializable;
* 用户实体
* </p>
*
* @package: com.xkcoding.cache.redis.entity
* @description: 用户实体
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:39
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:39
*/
@Data
@AllArgsConstructor

View File

@ -7,13 +7,8 @@ import com.xkcoding.cache.redis.entity.User;
* UserService
* </p>
*
* @package: com.xkcoding.cache.redis.service
* @description: UserService
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:45
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:45
*/
public interface UserService {
/**

View File

@ -16,13 +16,8 @@ import java.util.Map;
* UserService
* </p>
*
* @package: com.xkcoding.cache.redis.service.impl
* @description: UserService
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:45
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:45
*/
@Service
@Slf4j

View File

@ -17,13 +17,8 @@ import java.util.stream.IntStream;
* Redis测试
* </p>
*
* @package: com.xkcoding.cache.redis
* @description: Redis测试
* @author: yangkai.shen
* @date: Created in 2018/11/15 17:17
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 17:17
*/
@Slf4j
public class RedisTest extends SpringBootDemoCacheRedisApplicationTests {

View File

@ -11,13 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
* Redis - 缓存测试
* </p>
*
* @package: com.xkcoding.cache.redis.service
* @description: Redis - 缓存测试
* @author: yangkai.shen
* @date: Created in 2018/11/15 16:53
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-15 16:53
*/
@Slf4j
public class UserServiceTest extends SpringBootDemoCacheRedisApplicationTests {

View File

@ -163,13 +163,8 @@ timestamp=LocalDateTime
* 代码生成器 工具类
* </p>
*
* @package: com.xkcoding.codegen.utils
* @description: 代码生成器 工具类
* @author: yangkai.shen
* @date: Created in 2019-03-22 09:27
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 09:27
*/
@Slf4j
@UtilityClass
@ -412,4 +407,4 @@ public class CodeGenUtil {
- [基于人人开源 自动构建项目_V1](https://qq343509740.gitee.io/2018/12/20/%E7%AC%94%E8%AE%B0/%E8%87%AA%E5%8A%A8%E6%9E%84%E5%BB%BA%E9%A1%B9%E7%9B%AE/%E5%9F%BA%E4%BA%8E%E4%BA%BA%E4%BA%BA%E5%BC%80%E6%BA%90%20%E8%87%AA%E5%8A%A8%E6%9E%84%E5%BB%BA%E9%A1%B9%E7%9B%AE_V1/)
- [Mybatis-Plus代码生成器](https://mybatis.plus/guide/generator.html#%E6%B7%BB%E5%8A%A0%E4%BE%9D%E8%B5%96)
- [Mybatis-Plus代码生成器](https://mybatis.plus/guide/generator.html#%E6%B7%BB%E5%8A%A0%E4%BE%9D%E8%B5%96)

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动器
* </p>
*
* @package: com.xkcoding.codegen
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2019-03-22 09:10
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 09:10
*/
@SpringBootApplication
public class SpringBootDemoCodegenApplication {

View File

@ -5,13 +5,8 @@ package com.xkcoding.codegen.common;
* 统一状态码接口
* </p>
*
* @package: com.xkcoding.rbac.shiro.common
* @description: 统一状态码接口
* @author: yangkai.shen
* @date: Created in 2019-03-21 16:28
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-21 16:28
*/
public interface IResultCode {
/**

View File

@ -10,13 +10,8 @@ import java.util.List;
* 分页结果集
* </p>
*
* @package: com.xkcoding.codegen.common
* @description: 分页结果集
* @author: yangkai.shen
* @date: Created in 2019-03-22 11:24
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 11:24
*/
@Data
@AllArgsConstructor

View File

@ -8,13 +8,8 @@ import lombok.NoArgsConstructor;
* 统一API对象返回
* </p>
*
* @package: com.xkcoding.codegen.common
* @description: 统一API对象返回
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:13
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:13
*/
@Data
@NoArgsConstructor

View File

@ -7,13 +7,8 @@ import lombok.Getter;
* 通用状态枚举
* </p>
*
* @package: com.xkcoding.codegen.common
* @description: 通用状态枚举
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:13
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:13
*/
@Getter
public enum ResultCode implements IResultCode {

View File

@ -5,13 +5,8 @@ package com.xkcoding.codegen.constants;
* 常量池
* </p>
*
* @package: com.xkcoding.codegen.constants
* @description: 常量池
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:04
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:04
*/
public interface GenConstants {
/**

View File

@ -17,13 +17,8 @@ import javax.servlet.http.HttpServletResponse;
* 代码生成器
* </p>
*
* @package: com.xkcoding.codegen.controller
* @description: 代码生成器
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:11
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:11
*/
@RestController
@AllArgsConstructor

View File

@ -7,13 +7,8 @@ import lombok.Data;
* 列属性 https://blog.csdn.net/lkforce/article/details/79557482
* </p>
*
* @package: com.xkcoding.codegen.entity
* @description: 列属性 https://blog.csdn.net/lkforce/article/details/79557482
* @author: yangkai.shen
* @date: Created in 2019-03-22 09:46
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 09:46
*/
@Data
public class ColumnEntity {

View File

@ -7,13 +7,8 @@ import lombok.Data;
* 生成配置
* </p>
*
* @package: com.xkcoding.codegen.entity
* @description: 生成配置
* @author: yangkai.shen
* @date: Created in 2019-03-22 09:47
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 09:47
*/
@Data
public class GenConfig {

View File

@ -9,13 +9,8 @@ import java.util.List;
* 表属性 https://blog.csdn.net/lkforce/article/details/79557482
* </p>
*
* @package: com.xkcoding.codegen.entity
* @description: 表属性 https://blog.csdn.net/lkforce/article/details/79557482
* @author: yangkai.shen
* @date: Created in 2019-03-22 09:47
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 09:47
*/
@Data
public class TableEntity {

View File

@ -7,13 +7,8 @@ import lombok.Data;
* 表格请求参数
* </p>
*
* @package: com.xkcoding.codegen.entity
* @description: 表格请求参数
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:24
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:24
*/
@Data
public class TableRequest {

View File

@ -10,13 +10,8 @@ import com.xkcoding.codegen.entity.TableRequest;
* 代码生成器
* </p>
*
* @package: com.xkcoding.codegen.service
* @description: 代码生成器
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:15
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:15
*/
public interface CodeGenService {
/**

View File

@ -26,13 +26,8 @@ import java.util.zip.ZipOutputStream;
* 代码生成器
* </p>
*
* @package: com.xkcoding.codegen.service.impl
* @description: 代码生成器
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:15
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:15
*/
@Service
@AllArgsConstructor

View File

@ -31,13 +31,8 @@ import java.util.zip.ZipOutputStream;
* 代码生成器 工具类
* </p>
*
* @package: com.xkcoding.codegen.utils
* @description: 代码生成器 工具类
* @author: yangkai.shen
* @date: Created in 2019-03-22 09:27
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 09:27
*/
@Slf4j
@UtilityClass

View File

@ -10,13 +10,8 @@ import lombok.extern.slf4j.Slf4j;
* 数据库工具类
* </p>
*
* @package: com.xkcoding.codegen.utils
* @description: 数据库工具类
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:26
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:26
*/
@Slf4j
@UtilityClass

View File

@ -1,9 +1,9 @@
/**
* @version: 1.0 Alpha-1
* @author: Coolite Inc. http://www.coolite.com/
* @author Coolite Inc. http://www.coolite.com/
* @date: 2008-05-13
* @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
* @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
* @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
* @website: http://www.datejs.com/
*/
Date.CultureInfo={name:"zh-CN",englishName:"Chinese (People's Republic of China)",nativeName:"中文(中华人民共和国)",dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],abbreviatedDayNames:["日","一","二","三","四","五","六"],shortestDayNames:["日","一","二","三","四","五","六"],firstLetterDayNames:["日","一","二","三","四","五","六"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],abbreviatedMonthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],amDesignator:"上午",pmDesignator:"下午",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/M/d",longDate:"yyyy'年'M'月'd'日'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy'年'M'月'd'日' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M'月'd'日'",yearMonth:"yyyy'年'M'月'"},regexPatterns:{jan:/^一月/i,feb:/^二月/i,mar:/^三月/i,apr:/^四月/i,may:/^五月/i,jun:/^六月/i,jul:/^七月/i,aug:/^八月/i,sep:/^九月/i,oct:/^十月/i,nov:/^十一月/i,dec:/^十二月/i,sun:/^星期日/i,mon:/^星期一/i,tue:/^星期二/i,wed:/^星期三/i,thu:/^星期四/i,fri:/^星期五/i,sat:/^星期六/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};

View File

@ -17,13 +17,8 @@ import lombok.extern.slf4j.Slf4j;
* ${comments}
* </p>
*
* @package: ${package}.${moduleName}.controller
* @description: ${comments}
* @author: ${author}
* @date: Created in ${datetime}
* @copyright: Copyright (c) ${year}
* @version: V1.0
* @modified: ${author}
* @author ${author}
* @date Created in ${datetime}
*/
@Slf4j
@RestController

View File

@ -17,13 +17,8 @@ import lombok.NoArgsConstructor;
* ${comments}
* </p>
*
* @package: ${package}.${moduleName}.entity
* @description: ${comments}
* @author: ${author}
* @date: Created in ${datetime}
* @copyright: Copyright (c) ${year}
* @version: V1.0
* @modified: ${author}
* @author ${author}
* @date Created in ${datetime}
*/
@Data
@NoArgsConstructor

View File

@ -9,13 +9,8 @@ import ${package}.${moduleName}.entity.${className};
* ${comments}
* </p>
*
* @package: ${package}.${moduleName}.mapper
* @description: ${comments}
* @author: ${author}
* @date: Created in ${datetime}
* @copyright: Copyright (c) ${year}
* @version: V1.0
* @modified: ${author}
* @author ${author}
* @date Created in ${datetime}
*/
@Component
public interface ${className}Mapper extends BaseMapper<${className}> {

View File

@ -8,13 +8,8 @@ import ${package}.${moduleName}.entity.${className};
* ${comments}
* </p>
*
* @package: ${package}.${moduleName}.service
* @description: ${comments}
* @author: ${author}
* @date: Created in ${datetime}
* @copyright: Copyright (c) ${year}
* @version: V1.0
* @modified: ${author}
* @author ${author}
* @date Created in ${datetime}
*/
public interface ${className}Service extends IService<${className}> {

View File

@ -11,13 +11,8 @@ import lombok.extern.slf4j.Slf4j;
* ${comments}
* </p>
*
* @package: ${package}.${moduleName}.service.impl
* @description: ${comments}
* @author: ${author}
* @date: Created in ${datetime}
* @copyright: Copyright (c) ${year}
* @version: V1.0
* @modified: ${author}
* @author ${author}
* @date Created in ${datetime}
*/
@Service
@Slf4j

View File

@ -23,13 +23,8 @@ import java.io.OutputStream;
* 代码生成service测试
* </p>
*
* @package: com.xkcoding.codegen
* @description: 代码生成service测试
* @author: yangkai.shen
* @date: Created in 2019-03-22 10:34
* @copyright: Copyright (c) 2019
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2019-03-22 10:34
*/
@RunWith(SpringRunner.class)
@SpringBootTest

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动器
* </p>
*
* @package: com.xkcoding.docker
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-11-29 14:59
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-29 14:59
*/
@SpringBootApplication
public class SpringBootDemoDockerApplication {

View File

@ -9,13 +9,8 @@ import org.springframework.web.bind.annotation.RestController;
* Hello Controller
* </p>
*
* @package: com.xkcoding.docker.controller
* @description: Hello Controller
* @author: yangkai.shen
* @date: Created in 2018-11-29 14:58
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-29 14:58
*/
@RestController
@RequestMapping

View File

@ -27,7 +27,7 @@
<build>
<finalName>spring-boot-demo-dubbo-common</finalName>
</build>
</project>
```
@ -39,13 +39,8 @@
* Hello服务接口
* </p>
*
* @package: com.xkcoding.dubbo.common.service
* @description: Hello服务接口
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:56
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:56
*/
public interface HelloService {
/**

View File

@ -5,13 +5,8 @@ package com.xkcoding.dubbo.common.service;
* Hello服务接口
* </p>
*
* @package: com.xkcoding.dubbo.common.service
* @description: Hello服务接口
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:56
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:56
*/
public interface HelloService {
/**

View File

@ -91,13 +91,8 @@ spring:
* 启动器
* </p>
*
* @package: com.xkcoding.dubbo.consumer
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:49
*/
@SpringBootApplication
@EnableDubboConfiguration
@ -117,13 +112,8 @@ public class SpringBootDemoDubboConsumerApplication {
* Hello服务API
* </p>
*
* @package: com.xkcoding.dubbo.consumer.controller
* @description: Hello服务API
* @author: yangkai.shen
* @date: Created in 2018-12-25 17:22
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 17:22
*/
@RestController
@Slf4j
@ -137,4 +127,4 @@ public class HelloController {
return helloService.sayHello(name);
}
}
```
```

View File

@ -9,13 +9,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动器
* </p>
*
* @package: com.xkcoding.dubbo.consumer
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:49
*/
@SpringBootApplication
@EnableDubboConfiguration

View File

@ -12,13 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
* Hello服务API
* </p>
*
* @package: com.xkcoding.dubbo.consumer.controller
* @description: Hello服务API
* @author: yangkai.shen
* @date: Created in 2018-12-25 17:22
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 17:22
*/
@RestController
@Slf4j

View File

@ -91,13 +91,8 @@ spring:
* 启动器
* </p>
*
* @package: com.xkcoding.dubbo.provider
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:49
*/
@EnableDubboConfiguration
@SpringBootApplication
@ -117,13 +112,8 @@ public class SpringBootDemoDubboProviderApplication {
* Hello服务实现
* </p>
*
* @package: com.xkcoding.dubbo.provider.service
* @description: Hello服务实现
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:58
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:58
*/
@Service
@Component

View File

@ -9,13 +9,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动器
* </p>
*
* @package: com.xkcoding.dubbo.provider
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:49
*/
@EnableDubboConfiguration
@SpringBootApplication

View File

@ -10,13 +10,8 @@ import org.springframework.stereotype.Component;
* Hello服务实现
* </p>
*
* @package: com.xkcoding.dubbo.provider.service
* @description: Hello服务实现
* @author: yangkai.shen
* @date: Created in 2018-12-25 16:58
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-25 16:58
*/
@Service
@Component

View File

@ -99,7 +99,7 @@
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 10:27
* @date Created in 2019-09-04 10:27
*/
@Configuration
public class DatasourceConfiguration {
@ -125,7 +125,7 @@ public class DatasourceConfiguration {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:20
* @date Created in 2019-09-04 16:20
*/
@Configuration
@MapperScan(basePackages = "com.xkcoding.dynamicdatasource.mapper", sqlSessionFactoryRef = "sqlSessionFactory")
@ -159,7 +159,7 @@ public class MybatisConfiguration {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:16
* @date Created in 2019-09-04 14:16
*/
public class DatasourceConfigContextHolder {
private static final ThreadLocal<Long> DATASOURCE_HOLDER = ThreadLocal.withInitial(() -> DatasourceHolder.DEFAULT_ID);
@ -204,7 +204,7 @@ public class DatasourceConfigContextHolder {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 10:41
* @date Created in 2019-09-04 10:41
*/
@Slf4j
public class DynamicDataSource extends HikariDataSource {
@ -269,7 +269,7 @@ public class DynamicDataSource extends HikariDataSource {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:42
* @date Created in 2019-09-04 14:42
*/
public enum DatasourceScheduler {
/**
@ -313,7 +313,7 @@ public enum DatasourceScheduler {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:27
* @date Created in 2019-09-04 14:27
*/
public class DatasourceManager {
/**
@ -370,7 +370,7 @@ public class DatasourceManager {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:23
* @date Created in 2019-09-04 14:23
*/
public enum DatasourceHolder {
/**
@ -461,7 +461,7 @@ public enum DatasourceHolder {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:13
* @date Created in 2019-09-04 17:13
*/
public enum DatasourceConfigCache {
/**
@ -519,7 +519,7 @@ public enum DatasourceConfigCache {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:57
* @date Created in 2019-09-04 17:57
*/
@SpringBootApplication
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@ -571,7 +571,7 @@ public class SpringBootDemoDynamicDatasourceApplication implements CommandLineRu
>
> - DELETE http://localhost:8080/config/{id}
>
> 新增数据源:
> 新增数据源:
>
> - POST http://localhost:8080/config
>
@ -600,7 +600,7 @@ public class SpringBootDemoDynamicDatasourceApplication implements CommandLineRu
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:52
* @date Created in 2019-09-04 16:52
*/
@Aspect
@Component
@ -657,7 +657,7 @@ public class DatasourceSelectorAspect {
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:37
* @date Created in 2019-09-04 17:37
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@ -666,4 +666,4 @@ public @interface DefaultDatasource {
}
```
完结,撒花✿✿ヽ(°▽°)ノ✿
完结,撒花✿✿ヽ(°▽°)ノ✿

View File

@ -18,7 +18,7 @@ import java.util.List;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:57
* @date Created in 2019-09-04 17:57
*/
@SpringBootApplication
@RequiredArgsConstructor(onConstructor_ = @Autowired)

View File

@ -8,7 +8,7 @@ import java.lang.annotation.*;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:37
* @date Created in 2019-09-04 17:37
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)

View File

@ -26,7 +26,7 @@ import java.lang.reflect.Method;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:52
* @date Created in 2019-09-04 16:52
*/
@Aspect
@Component

View File

@ -14,7 +14,7 @@ import javax.sql.DataSource;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 10:27
* @date Created in 2019-09-04 10:27
*/
@Configuration
public class DatasourceConfiguration {

View File

@ -10,7 +10,7 @@ import tk.mybatis.mapper.common.MySqlMapper;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:23
* @date Created in 2019-09-04 16:23
*/
@RegisterMapper
public interface MyMapper<T> extends Mapper<T>, MySqlMapper<T> {

View File

@ -16,7 +16,7 @@ import javax.sql.DataSource;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:20
* @date Created in 2019-09-04 16:20
*/
@Configuration
@MapperScan(basePackages = "com.xkcoding.dynamic.datasource.mapper", sqlSessionFactoryRef = "sqlSessionFactory")

View File

@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:31
* @date Created in 2019-09-04 17:31
*/
@RestController
@RequiredArgsConstructor(onConstructor_ = @Autowired)

View File

@ -15,7 +15,7 @@ import java.util.List;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:40
* @date Created in 2019-09-04 16:40
*/
@RestController
@RequiredArgsConstructor(onConstructor_ = @Autowired)

View File

@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentHashMap;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 17:13
* @date Created in 2019-09-04 17:13
*/
public enum DatasourceConfigCache {
/**

View File

@ -6,7 +6,7 @@ package com.xkcoding.dynamic.datasource.datasource;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:16
* @date Created in 2019-09-04 14:16
*/
public class DatasourceConfigContextHolder {
private static final ThreadLocal<Long> DATASOURCE_HOLDER = ThreadLocal.withInitial(() -> DatasourceHolder.DEFAULT_ID);

View File

@ -11,7 +11,7 @@ import java.util.concurrent.ConcurrentHashMap;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:23
* @date Created in 2019-09-04 14:23
*/
public enum DatasourceHolder {
/**

View File

@ -11,7 +11,7 @@ import java.time.LocalDateTime;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:27
* @date Created in 2019-09-04 14:27
*/
public class DatasourceManager {
/**

View File

@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 14:42
* @date Created in 2019-09-04 14:42
*/
public enum DatasourceScheduler {
/**

View File

@ -15,7 +15,7 @@ import java.sql.SQLException;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 10:41
* @date Created in 2019-09-04 10:41
*/
@Slf4j
public class DynamicDataSource extends HikariDataSource {

View File

@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:20
* @date Created in 2019-09-04 16:20
*/
@Mapper
public interface DatasourceConfigMapper extends MyMapper<DatasourceConfig> {

View File

@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:49
* @date Created in 2019-09-04 16:49
*/
@Mapper
public interface UserMapper extends MyMapper<User> {

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 10:58
* @date Created in 2019-09-04 10:58
*/
@Data
@Table(name = "datasource_config")

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:41
* @date Created in 2019-09-04 16:41
*/
@Data
@Table(name = "test_user")

View File

@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
* </p>
*
* @author yangkai.shen
* @date Created in 2019/9/4 16:16
* @date Created in 2019-09-04 16:16
*/
@Slf4j
@Service

View File

@ -1,6 +1,6 @@
# spring-boot-demo-elasticsearch-rest-high-level-client
> 此 demo 主要演示了 Spring Boot 如何集成 `elasticsearch-rest-high-level-client` 完成对 `ElasticSearch 7.x` 版本的基本 CURD 操作
> 此 demo 主要演示了 Spring Boot 如何集成 `elasticsearch-rest-high-level-client` 完成对 `ElasticSearch 7.x` 版本的基本 CURD 操作
## Elasticsearch 升级
@ -36,7 +36,7 @@ services:
- "/data/es7/logs:/usr/share/es7/logs:rw"
- "/data/es7/data:/usr/share/es7/data:rw"
restart: on-failure
ports:
ports:
- "9200:9200"
- "9300:9300"
environment:
@ -184,7 +184,7 @@ import java.util.Date;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:04
* @since 2019-09-15 23:04
*/
@Data
@Builder
@ -242,7 +242,7 @@ import java.util.List;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:07
* @since 2019-09-15 23:07
*/
public interface PersonService {
@ -328,7 +328,7 @@ import java.util.Map;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:08
* @since 2019-09-15 23:08
*/
@Service
public class PersonServiceImpl extends BaseElasticsearchService implements PersonService {

View File

@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:10
* @since 2019-09-15 23:10
*/
@SpringBootApplication
public class ElasticsearchApplication {

View File

@ -10,7 +10,7 @@ import java.io.Serializable;
*
* @author fxbin
* @version v1.0
* @since 2019/8/26 1:44
* @since 2019-08-26 1:44
*/
@Data
public class Result<T> implements Serializable {

View File

@ -8,7 +8,7 @@ import lombok.Getter;
*
* @author fxbin
* @version v1.0
* @since 2019/8/26 1:47
* @since 2019-08-26 1:47
*/
@Getter
@AllArgsConstructor

View File

@ -25,7 +25,7 @@ import java.util.List;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 22:59
* @since 2019-09-15 22:59
*/
@Configuration
@RequiredArgsConstructor(onConstructor_ = @Autowired)

View File

@ -16,7 +16,7 @@ import java.util.List;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 22:58
* @since 2019-09-15 22:58
*/
@Data
@Builder

View File

@ -5,7 +5,7 @@ package com.xkcoding.elasticsearch.contants;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:03
* @since 2019-09-15 23:03
*/
public interface ElasticsearchConstant {

View File

@ -8,7 +8,7 @@ import lombok.Getter;
*
* @author fxbin
* @version v1.0
* @since 2019/8/26 1:53
* @since 2019-08-26 1:53
*/
public class ElasticsearchException extends RuntimeException {

View File

@ -13,7 +13,7 @@ import java.util.Date;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:04
* @since 2019-09-15 23:04
*/
@Data
@Builder

View File

@ -10,7 +10,7 @@ import java.util.List;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:07
* @since 2019-09-15 23:07
*/
public interface PersonService {

View File

@ -28,7 +28,7 @@ import java.io.IOException;
*
* @author fxbin
* @version 1.0v
* @since 2019/9/16 15:44
* @since 2019-09-16 15:44
*/
@Slf4j
public abstract class BaseElasticsearchService {

View File

@ -21,7 +21,7 @@ import java.util.Map;
*
* @author fxbin
* @version v1.0
* @since 2019/9/15 23:08
* @since 2019-09-15 23:08
*/
@Service
public class PersonServiceImpl extends BaseElasticsearchService implements PersonService {

View File

@ -10,7 +10,7 @@
2. 运行容器:`docker run -d -p 9200:9200 -p 9300:9300 --name elasticsearch-6.5.3 elasticsearch:6.5.3`
3. 进入容器:`docker exec -it elasticsearch-6.5.3 /bin/bash`
3. 进入容器:`docker exec -it elasticsearch-6.5.3 /bin/bash`
4. 安装 ik 分词器:`./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.5.3/elasticsearch-analysis-ik-6.5.3.zip`
@ -19,12 +19,12 @@
```yaml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
# just for elasticsearch-head plugin
http.cors.enabled: true
http.cors.allow-origin: "*"
@ -124,13 +124,8 @@
* 用户实体类
* </p>
*
* @package: com.xkcoding.elasticsearch.model
* @description: 用户实体类
* @author: yangkai.shen
* @date: Created in 2018-12-20 17:29
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 17:29
*/
@Document(indexName = EsConsts.INDEX_NAME, type = EsConsts.TYPE_NAME, shards = 1, replicas = 0)
@Data
@ -183,13 +178,8 @@ public class Person {
* 用户持久层
* </p>
*
* @package: com.xkcoding.elasticsearch.repository
* @description: 用户持久层
* @author: yangkai.shen
* @date: Created in 2018-12-20 19:00
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 19:00
*/
public interface PersonRepository extends ElasticsearchRepository<Person, Long> {
@ -214,13 +204,8 @@ public interface PersonRepository extends ElasticsearchRepository<Person, Long>
* 测试 ElasticTemplate 的创建/删除
* </p>
*
* @package: com.xkcoding.elasticsearch.template
* @description: 测试 ElasticTemplate 的创建/删除
* @author: yangkai.shen
* @date: Created in 2018-12-20 17:46
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 17:46
*/
public class TemplateTest extends SpringBootDemoElasticsearchApplicationTests {
@Autowired
@ -258,13 +243,8 @@ public class TemplateTest extends SpringBootDemoElasticsearchApplicationTests {
* 测试 Repository 操作ES
* </p>
*
* @package: com.xkcoding.elasticsearch.repository
* @description: 测试 Repository 操作ES
* @author: yangkai.shen
* @date: Created in 2018-12-20 19:03
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 19:03
*/
@Slf4j
public class PersonRepositoryTest extends SpringBootDemoElasticsearchApplicationTests {

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动类
* </p>
*
* @package: com.xkcoding.elasticsearch
* @description: 启动类
* @author: yangkai.shen
* @date: Created in 2018/10/27 22:52
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-10-27 22:52
*/
@SpringBootApplication
public class SpringBootDemoElasticsearchApplication {

View File

@ -5,13 +5,8 @@ package com.xkcoding.elasticsearch.constants;
* ES常量池
* </p>
*
* @package: com.xkcoding.elasticsearch.constants
* @description: ES常量池
* @author: yangkai.shen
* @date: Created in 2018-12-20 17:30
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 17:30
*/
public interface EsConsts {
/**

View File

@ -16,13 +16,8 @@ import java.util.Date;
* 用户实体类
* </p>
*
* @package: com.xkcoding.elasticsearch.model
* @description: 用户实体类
* @author: yangkai.shen
* @date: Created in 2018-12-20 17:29
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 17:29
*/
@Document(indexName = EsConsts.INDEX_NAME, type = EsConsts.TYPE_NAME, shards = 1, replicas = 0)
@Data

View File

@ -10,13 +10,8 @@ import java.util.List;
* 用户持久层
* </p>
*
* @package: com.xkcoding.elasticsearch.repository
* @description: 用户持久层
* @author: yangkai.shen
* @date: Created in 2018-12-20 19:00
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 19:00
*/
public interface PersonRepository extends ElasticsearchRepository<Person, Long> {

View File

@ -29,13 +29,8 @@ import java.util.List;
* 测试 Repository 操作ES
* </p>
*
* @package: com.xkcoding.elasticsearch.repository
* @description: 测试 Repository 操作ES
* @author: yangkai.shen
* @date: Created in 2018-12-20 19:03
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 19:03
*/
@Slf4j
public class PersonRepositoryTest extends SpringBootDemoElasticsearchApplicationTests {
@ -194,4 +189,4 @@ public class PersonRepositoryTest extends SpringBootDemoElasticsearchApplication
}
}
}
}

View File

@ -11,13 +11,8 @@ import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
* 测试 ElasticTemplate 的创建/删除
* </p>
*
* @package: com.xkcoding.elasticsearch.template
* @description: 测试 ElasticTemplate 的创建/删除
* @author: yangkai.shen
* @date: Created in 2018-12-20 17:46
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-12-20 17:46
*/
public class TemplateTest extends SpringBootDemoElasticsearchApplicationTests {
@Autowired

View File

@ -83,7 +83,7 @@ spring:
host: smtp.mxhichina.com
port: 465
username: spring-boot-demo@xkcoding.com
# 使用 jasypt 加密密码使用com.xkcoding.email.PasswordTest.testGeneratePassword 生成加密密码,替换 ENC(加密密码)
# 使用 jasypt 加密密码使用com.xkcoding.email.PasswordTest.testGeneratePassword 生成加密密码,替换 ENC(加密密码)
password: ENC(OT0qGOpXrr1Iog1W+fjOiIDCJdBjHyhy)
protocol: smtp
test-connection: true
@ -109,13 +109,8 @@ jasypt:
* 邮件接口
* </p>
*
* @package: com.xkcoding.email.service
* @description: 邮件接口
* @author: yangkai.shen
* @date: Created in 2018/11/21 11:16
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-21 11:16
*/
public interface MailService {
/**
@ -164,7 +159,7 @@ public interface MailService {
*/
void sendResourceMail(String to, String subject, String content, String rscPath, String rscId, String... cc) throws MessagingException;
}
}
```
## MailServiceImpl.java
@ -175,13 +170,8 @@ public interface MailService {
* 邮件接口
* </p>
*
* @package: com.xkcoding.email.service.impl
* @description: 邮件接口
* @author: yangkai.shen
* @date: Created in 2018/11/21 13:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-21 13:49
*/
@Service
public class MailServiceImpl implements MailService {
@ -302,13 +292,8 @@ public class MailServiceImpl implements MailService {
* 邮件测试
* </p>
*
* @package: com.xkcoding.email.service
* @description: 邮件测试
* @author: yangkai.shen
* @date: Created in 2018/11/21 13:49
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-21 13:49
*/
public class MailServiceTest extends SpringBootDemoEmailApplicationTests {
@Autowired
@ -453,4 +438,4 @@ public class MailServiceTest extends SpringBootDemoEmailApplicationTests {
## 参考
- Spring Boot 官方文档https://docs.spring.io/spring-boot/docs/2.1.0.RELEASE/reference/htmlsingle/#boot-features-email
- Spring Boot 官方文档https://docs.spring.io/spring/docs/5.1.2.RELEASE/spring-framework-reference/integration.html#mail
- Spring Boot 官方文档https://docs.spring.io/spring/docs/5.1.2.RELEASE/spring-framework-reference/integration.html#mail

View File

@ -8,13 +8,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* 启动器
* </p>
*
* @package: com.xkcoding.email
* @description: 启动器
* @author: yangkai.shen
* @date: Created in 2018/11/4 22:38
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-04 22:38
*/
@SpringBootApplication
public class SpringBootDemoEmailApplication {

View File

@ -7,13 +7,8 @@ import javax.mail.MessagingException;
* 邮件接口
* </p>
*
* @package: com.xkcoding.email.service
* @description: 邮件接口
* @author: yangkai.shen
* @date: Created in 2018/11/21 11:16
* @copyright: Copyright (c) 2018
* @version: V1.0
* @modified: yangkai.shen
* @author yangkai.shen
* @date Created in 2018-11-21 11:16
*/
public interface MailService {
/**
@ -62,4 +57,4 @@ public interface MailService {
*/
void sendResourceMail(String to, String subject, String content, String rscPath, String rscId, String... cc) throws MessagingException;
}
}

Some files were not shown because too many files have changed in this diff Show More