【7.3.0】重新整理注释

pull/20/head
fengshuonan 2022-10-24 23:50:30 +08:00
parent b989a82dca
commit ea389df554
19 changed files with 47 additions and 47 deletions

View File

@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
* SpringBoot * SpringBoot
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/1 17:50 * @since 2020/12/1 17:50
*/ */
@Slf4j @Slf4j
@SpringBootApplication(scanBasePackages = {"cn.stylefeng"}, exclude = {FlywayAutoConfiguration.class, GunsDataSourceAutoConfiguration.class}) @SpringBootApplication(scanBasePackages = {"cn.stylefeng"}, exclude = {FlywayAutoConfiguration.class, GunsDataSourceAutoConfiguration.class})

View File

@ -7,7 +7,7 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
* Web * Web
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/1 17:50 * @since 2020/12/1 17:50
*/ */
public class GunsServletInitializer extends SpringBootServletInitializer { public class GunsServletInitializer extends SpringBootServletInitializer {

View File

@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration;
* mapper * mapper
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/13 16:11 * @since 2020/12/13 16:11
*/ */
@Configuration @Configuration
@MapperScan(basePackages = {"cn.stylefeng.**.mapper"}) @MapperScan(basePackages = {"cn.stylefeng.**.mapper"})

View File

@ -20,7 +20,7 @@ import javax.annotation.Resource;
* spring mvc * spring mvc
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/4/11 10:23 * @since 2020/4/11 10:23
*/ */
@Configuration @Configuration
@Import({cn.hutool.extra.spring.SpringUtil.class, CorsFilterConfiguration.class}) @Import({cn.hutool.extra.spring.SpringUtil.class, CorsFilterConfiguration.class})
@ -36,7 +36,7 @@ public class SpringMvcConfiguration implements WebMvcConfigurer {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 15:36 * @since 2020/12/16 15:36
*/ */
@Bean @Bean
public CustomErrorAttributes gunsErrorAttributes() { public CustomErrorAttributes gunsErrorAttributes() {
@ -47,7 +47,7 @@ public class SpringMvcConfiguration implements WebMvcConfigurer {
* json,longstring * json,longstring
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/13 17:16 * @since 2020/12/13 17:16
*/ */
@Bean @Bean
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
@ -61,7 +61,7 @@ public class SpringMvcConfiguration implements WebMvcConfigurer {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/18 9:43 * @since 2020/12/18 9:43
*/ */
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
@ -73,7 +73,7 @@ public class SpringMvcConfiguration implements WebMvcConfigurer {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/16 21:45 * @since 2021/1/16 21:45
*/ */
@Override @Override
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {

View File

@ -6,7 +6,7 @@ import cn.stylefeng.guns.GunsApplication;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:28 * @since 2020/12/16 14:28
*/ */
public interface ProjectConstants { public interface ProjectConstants {

View File

@ -16,7 +16,7 @@ import java.util.Map;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:36 * @since 2020/12/16 14:36
*/ */
public class CustomErrorAttributes extends DefaultErrorAttributes { public class CustomErrorAttributes extends DefaultErrorAttributes {

View File

@ -47,7 +47,7 @@ import static cn.stylefeng.guns.core.consts.ProjectConstants.ROOT_PACKAGE_NAME;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:20 * @since 2020/12/16 14:20
*/ */
@ControllerAdvice @ControllerAdvice
@Slf4j @Slf4j
@ -57,7 +57,7 @@ public class GlobalExceptionHandler {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:20 * @since 2020/12/16 14:20
*/ */
@ExceptionHandler(MissingServletRequestParameterException.class) @ExceptionHandler(MissingServletRequestParameterException.class)
@ResponseBody @ResponseBody
@ -72,7 +72,7 @@ public class GlobalExceptionHandler {
* HttpMessageConverterjson * HttpMessageConverterjson
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:21 * @since 2020/12/16 14:21
*/ */
@ExceptionHandler(HttpMessageNotReadableException.class) @ExceptionHandler(HttpMessageNotReadableException.class)
@ResponseBody @ResponseBody
@ -86,7 +86,7 @@ public class GlobalExceptionHandler {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:26 * @since 2020/12/16 14:26
*/ */
@ExceptionHandler(HttpMediaTypeNotSupportedException.class) @ExceptionHandler(HttpMediaTypeNotSupportedException.class)
@ResponseBody @ResponseBody
@ -100,7 +100,7 @@ public class GlobalExceptionHandler {
* http method * http method
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:56 * @since 2020/12/16 14:56
*/ */
@ExceptionHandler(HttpRequestMethodNotSupportedException.class) @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
@ResponseBody @ResponseBody
@ -114,7 +114,7 @@ public class GlobalExceptionHandler {
* 404 * 404
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:58 * @since 2020/12/16 14:58
*/ */
@ExceptionHandler(NoHandlerFoundException.class) @ExceptionHandler(NoHandlerFoundException.class)
@ResponseBody @ResponseBody
@ -127,7 +127,7 @@ public class GlobalExceptionHandler {
* @Valid * @Valid
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:59 * @since 2020/12/16 14:59
*/ */
@ExceptionHandler(MethodArgumentNotValidException.class) @ExceptionHandler(MethodArgumentNotValidException.class)
@ResponseBody @ResponseBody
@ -143,7 +143,7 @@ public class GlobalExceptionHandler {
* @Valid @Validated * @Valid @Validated
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 15:08 * @since 2020/12/16 15:08
*/ */
@ExceptionHandler(BindException.class) @ExceptionHandler(BindException.class)
@ResponseBody @ResponseBody
@ -157,7 +157,7 @@ public class GlobalExceptionHandler {
* @TableUniqueValue * @TableUniqueValue
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/26 14:05 * @since 2020/12/26 14:05
*/ */
@ExceptionHandler(ValidationException.class) @ExceptionHandler(ValidationException.class)
@ResponseBody @ResponseBody
@ -180,7 +180,7 @@ public class GlobalExceptionHandler {
* ajax * ajax
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 15:11 * @since 2020/12/16 15:11
*/ */
@ExceptionHandler(AuthException.class) @ExceptionHandler(AuthException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ -221,7 +221,7 @@ public class GlobalExceptionHandler {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 15:11 * @since 2020/12/16 15:11
*/ */
@ExceptionHandler(ServiceException.class) @ExceptionHandler(ServiceException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ -237,7 +237,7 @@ public class GlobalExceptionHandler {
* demoDemoException * demoDemoException
* *
* @author stylefeng * @author stylefeng
* @date 2020/5/5 15:19 * @since 2020/5/5 15:19
*/ */
@ExceptionHandler(MyBatisSystemException.class) @ExceptionHandler(MyBatisSystemException.class)
@ResponseBody @ResponseBody
@ -257,7 +257,7 @@ public class GlobalExceptionHandler {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 15:12 * @since 2020/12/16 15:12
*/ */
@ExceptionHandler(Throwable.class) @ExceptionHandler(Throwable.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ -271,7 +271,7 @@ public class GlobalExceptionHandler {
* json * json
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/5/5 16:22 * @since 2020/5/5 16:22
*/ */
private ErrorResponseData<?> renderJson(String code, String message) { private ErrorResponseData<?> renderJson(String code, String message) {
return renderJson(code, message, null); return renderJson(code, message, null);
@ -281,7 +281,7 @@ public class GlobalExceptionHandler {
* json * json
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/5/5 16:22 * @since 2020/5/5 16:22
*/ */
private ErrorResponseData<?> renderJson(AbstractExceptionEnum exception, Object... params) { private ErrorResponseData<?> renderJson(AbstractExceptionEnum exception, Object... params) {
return renderJson(exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params), null); return renderJson(exception.getErrorCode(), StrUtil.format(exception.getUserTip(), params), null);
@ -291,7 +291,7 @@ public class GlobalExceptionHandler {
* json * json
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/5/5 16:22 * @since 2020/5/5 16:22
*/ */
private ErrorResponseData<?> renderJson(AbstractExceptionEnum abstractExceptionEnum) { private ErrorResponseData<?> renderJson(AbstractExceptionEnum abstractExceptionEnum) {
return renderJson(abstractExceptionEnum.getErrorCode(), abstractExceptionEnum.getUserTip(), null); return renderJson(abstractExceptionEnum.getErrorCode(), abstractExceptionEnum.getUserTip(), null);
@ -301,7 +301,7 @@ public class GlobalExceptionHandler {
* json * json
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/5/5 16:22 * @since 2020/5/5 16:22
*/ */
private ErrorResponseData<?> renderJson(Throwable throwable) { private ErrorResponseData<?> renderJson(Throwable throwable) {
return renderJson(DefaultBusinessExceptionEnum.SYSTEM_RUNTIME_ERROR.getErrorCode(), DefaultBusinessExceptionEnum.SYSTEM_RUNTIME_ERROR.getUserTip(), throwable); return renderJson(DefaultBusinessExceptionEnum.SYSTEM_RUNTIME_ERROR.getErrorCode(), DefaultBusinessExceptionEnum.SYSTEM_RUNTIME_ERROR.getUserTip(), throwable);
@ -313,7 +313,7 @@ public class GlobalExceptionHandler {
* Throwable * Throwable
* *
* @author stylefeng * @author stylefeng
* @date 2020/5/5 16:22 * @since 2020/5/5 16:22
*/ */
private ErrorResponseData<?> renderJson(String code, String message, Throwable throwable) { private ErrorResponseData<?> renderJson(String code, String message, Throwable throwable) {
if (ObjectUtil.isNotNull(throwable)) { if (ObjectUtil.isNotNull(throwable)) {
@ -331,7 +331,7 @@ public class GlobalExceptionHandler {
* *
* *
* @author stylefeng * @author stylefeng
* @date 2020/5/5 16:50 * @since 2020/5/5 16:50
*/ */
private String getArgNotValidMessage(BindingResult bindingResult) { private String getArgNotValidMessage(BindingResult bindingResult) {
if (bindingResult == null) { if (bindingResult == null) {
@ -357,7 +357,7 @@ public class GlobalExceptionHandler {
* Json * Json
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/5/18 10:48 * @since 2021/5/18 10:48
*/ */
private String renderLoginResult(HttpServletResponse response, AuthException authException, Model model) { private String renderLoginResult(HttpServletResponse response, AuthException authException, Model model) {

View File

@ -9,7 +9,7 @@ import static cn.stylefeng.guns.core.consts.ProjectConstants.PROJECT_MODULE_NAME
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/16 14:26 * @since 2020/12/16 14:26
*/ */
public class BusinessException extends ServiceException { public class BusinessException extends ServiceException {

View File

@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletResponse;
* token * token
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/15 22:45 * @since 2020/12/15 22:45
*/ */
@Component @Component
@Slf4j @Slf4j

View File

@ -17,7 +17,7 @@ import javax.servlet.http.HttpServletResponse;
* 访 * 访
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/15 22:46 * @since 2020/12/15 22:46
*/ */
@Component @Component
@Slf4j @Slf4j

View File

@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletResponse;
* Filter * Filter
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/15 22:50 * @since 2020/12/15 22:50
*/ */
@Slf4j @Slf4j
public abstract class BaseSecurityInterceptor implements HandlerInterceptor { public abstract class BaseSecurityInterceptor implements HandlerInterceptor {
@ -99,7 +99,7 @@ public abstract class BaseSecurityInterceptor implements HandlerInterceptor {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2020/12/15 22:52 * @since 2020/12/15 22:52
*/ */
public abstract void filterAction(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, ResourceDefinition resourceDefinition, String token); public abstract void filterAction(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, ResourceDefinition resourceDefinition, String token);

View File

@ -16,7 +16,7 @@ import javax.annotation.Resource;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/24 10:57 * @since 2021/1/24 10:57
*/ */
@RestController @RestController
@ApiResource(name = "示例") @ApiResource(name = "示例")
@ -29,7 +29,7 @@ public class DemoController {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/24 10:59 * @since 2021/1/24 10:59
*/ */
@GetResource(name = "示例方法", path = "/json/success") @GetResource(name = "示例方法", path = "/json/success")
public ResponseData<?> renderSuccess() { public ResponseData<?> renderSuccess() {
@ -44,7 +44,7 @@ public class DemoController {
* </p> * </p>
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/24 10:59 * @since 2021/1/24 10:59
*/ */
@PostResource(name = "示例加密方法", path = "/encode", requiredPermission = false, requiredLogin = false, requiredEncryption = true) @PostResource(name = "示例加密方法", path = "/encode", requiredPermission = false, requiredLogin = false, requiredEncryption = true)
public ResponseData<Dict> encode(@RequestBody Dict dict) { public ResponseData<Dict> encode(@RequestBody Dict dict) {

View File

@ -6,7 +6,7 @@ import org.springframework.stereotype.Service;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/24 10:58 * @since 2021/1/24 10:58
*/ */
@Service @Service
public class DemoService { public class DemoService {
@ -15,7 +15,7 @@ public class DemoService {
* demo * demo
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/24 10:58 * @since 2021/1/24 10:58
*/ */
public void demoService(){ public void demoService(){
System.out.println("这是一个demo方法"); System.out.println("这是一个demo方法");

View File

@ -13,7 +13,7 @@ import javax.annotation.Resource;
* *
* *
* @author stylefeng * @author stylefeng
* @date 2018/7/20 23:39 * @since 2018/7/20 23:39
*/ */
@RestController @RestController
@ApiResource(name = "测试多数据源") @ApiResource(name = "测试多数据源")

View File

@ -13,7 +13,7 @@ import javax.annotation.Resource;
* *
* *
* @author stylefeng * @author stylefeng
* @date 2018/7/20 23:39 * @since 2018/7/20 23:39
*/ */
@RestController @RestController
@ApiResource(name = "测试单数据源") @ApiResource(name = "测试单数据源")

View File

@ -9,7 +9,7 @@ import java.util.Date;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/23 23:29 * @since 2021/1/23 23:29
*/ */
public class NormalUserFactory { public class NormalUserFactory {
@ -17,7 +17,7 @@ public class NormalUserFactory {
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/23 23:29 * @since 2021/1/23 23:29
*/ */
public static SysUser createAnUser() { public static SysUser createAnUser() {
SysUser user = new SysUser(); SysUser user = new SysUser();

View File

@ -14,7 +14,7 @@ import javax.annotation.Resource;
* Guns * Guns
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/23 23:29 * @since 2021/1/23 23:29
*/ */
@Service @Service
public class GunsDbService extends ServiceImpl<SysUserMapper, SysUser> { public class GunsDbService extends ServiceImpl<SysUserMapper, SysUser> {

View File

@ -14,7 +14,7 @@ import javax.annotation.Resource;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/23 23:30 * @since 2021/1/23 23:30
*/ */
@Service @Service
public class OtherDbService extends ServiceImpl<SysUserMapper, SysUser> { public class OtherDbService extends ServiceImpl<SysUserMapper, SysUser> {

View File

@ -10,7 +10,7 @@ import javax.annotation.Resource;
* *
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/23 23:30 * @since 2021/1/23 23:30
*/ */
@Service @Service
public class TranTestService { public class TranTestService {