parent
77a89dc245
commit
aa49c13837
@ -0,0 +1,27 @@
|
||||
package com.luoo.comment.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
||||
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
import swagger.BaseSwaggerConfig;
|
||||
import swagger.SwaggerProperties;
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
public class SwaggerConfig extends BaseSwaggerConfig {
|
||||
|
||||
@Override
|
||||
public SwaggerProperties swaggerProperties() {
|
||||
return SwaggerProperties.builder()
|
||||
.apiBasePackage("com.luoo.comment.controller")
|
||||
.title("luoo-comment API")
|
||||
.description("luoo-comment 后端接口文档")
|
||||
.contactName("宇鹏")
|
||||
.version("1.0")
|
||||
.enableSecurity(false)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.luoo.comment.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurationSupport {
|
||||
@Override
|
||||
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
super.addResourceHandlers(registry);
|
||||
}
|
||||
}
|
@ -1,19 +1,32 @@
|
||||
package com.luoo.friend.config;
|
||||
|
||||
import com.luoo.friend.interceptor.JwtInterceptor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
import com.luoo.friend.interceptor.JwtInterceptor;
|
||||
|
||||
@Configuration
|
||||
public class InterceptorConfig extends WebMvcConfigurationSupport {
|
||||
|
||||
@Autowired
|
||||
private JwtInterceptor jwtInterceptor;
|
||||
protected void addInterceptors(InterceptorRegistry registry) {
|
||||
String[] excludePathPatterns = { "/user/login/**","/user/appLogin/**","/user/sendsms/**","/user/touristLogin","/doc.html/**","/swagger-resources/**","/webjars/**","/v2/**"};
|
||||
|
||||
registry.addInterceptor(jwtInterceptor).
|
||||
addPathPatterns("/**").
|
||||
excludePathPatterns("/login/**");
|
||||
excludePathPatterns(excludePathPatterns);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("doc.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
super.addResourceHandlers(registry);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.luoo.friend.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
||||
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
import swagger.BaseSwaggerConfig;
|
||||
import swagger.SwaggerProperties;
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
public class SwaggerConfig extends BaseSwaggerConfig {
|
||||
|
||||
@Override
|
||||
public SwaggerProperties swaggerProperties() {
|
||||
return SwaggerProperties.builder()
|
||||
.apiBasePackage("com.luoo.friend.controller")
|
||||
.title("luoo-friend API")
|
||||
.description("luoo-friend 后端接口文档")
|
||||
.contactName("jeffrey")
|
||||
.version("1.0")
|
||||
.enableSecurity(false)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.luoo.gathering.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
||||
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
import swagger.BaseSwaggerConfig;
|
||||
import swagger.SwaggerProperties;
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
public class SwaggerConfig extends BaseSwaggerConfig {
|
||||
|
||||
@Override
|
||||
public SwaggerProperties swaggerProperties() {
|
||||
return SwaggerProperties.builder()
|
||||
.apiBasePackage("com.luoo.gathering.controller")
|
||||
.title("luoo-gathering API")
|
||||
.description("luoo-gathering 后端接口文档")
|
||||
.contactName("")
|
||||
.version("1.0")
|
||||
.enableSecurity(false)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.luoo.gathering.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurationSupport {
|
||||
@Override
|
||||
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
super.addResourceHandlers(registry);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.luoo.tag.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
||||
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
import swagger.BaseSwaggerConfig;
|
||||
import swagger.SwaggerProperties;
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
public class SwaggerConfig extends BaseSwaggerConfig {
|
||||
|
||||
@Override
|
||||
public SwaggerProperties swaggerProperties() {
|
||||
return SwaggerProperties.builder()
|
||||
.apiBasePackage("com.luoo.tag.controller")
|
||||
.title("luoo-tag API")
|
||||
.description("luoo-tag 后端接口文档")
|
||||
.contactName("itao")
|
||||
.version("1.0")
|
||||
.enableSecurity(false)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.luoo.tag.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurationSupport {
|
||||
@Override
|
||||
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
super.addResourceHandlers(registry);
|
||||
}
|
||||
}
|
@ -1,29 +1,27 @@
|
||||
package com.luoo.tag.pojo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 标签更新请求参数
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "标签更新请求")
|
||||
@ApiModel(value = "标签更新请求")
|
||||
public class TagUpdateReq implements Serializable {
|
||||
private static final long serialVersionUID = -8810544476079524714L;
|
||||
|
||||
@Schema(description = "标签ID")
|
||||
@ApiModelProperty(value = "标签ID")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "标签中文名")
|
||||
@ApiModelProperty(value = "标签中文名")
|
||||
@NotBlank(message = "标签中文名称必填")
|
||||
private String nameCh;
|
||||
|
||||
@Schema(description = "标签英文名")
|
||||
@ApiModelProperty(value = "标签英文名")
|
||||
@NotBlank(message = "标签英文名称必填")
|
||||
private String nameEn;
|
||||
}
|
||||
|
Loading…
Reference in new issue