【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
*
* @author fengshuonan
* @date 2020/12/1 17:50
* @since 2020/12/1 17:50
*/
@Slf4j
@SpringBootApplication(scanBasePackages = {"cn.stylefeng"}, exclude = {FlywayAutoConfiguration.class, GunsDataSourceAutoConfiguration.class})

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletResponse;
* Filter
*
* @author fengshuonan
* @date 2020/12/15 22:50
* @since 2020/12/15 22:50
*/
@Slf4j
public abstract class BaseSecurityInterceptor implements HandlerInterceptor {
@ -99,7 +99,7 @@ public abstract class BaseSecurityInterceptor implements HandlerInterceptor {
*
*
* @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);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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