完善注释

pull/137/head
ruibaby 2019-03-28 14:39:36 +08:00
parent 68b78b9267
commit 5846d5abb9
27 changed files with 102 additions and 93 deletions

View File

@ -6,9 +6,8 @@
<artifactId>halo</artifactId> <artifactId>halo</artifactId>
<version>latest</version> <version>latest</version>
<name>halo</name> <name>halo</name>
<!-- 虽然Halo使用了宽松的GPL协议但开发不易希望您可以保留一下版权声明。笔芯~ -->
<description> <description>
Halo,一个基于 SpringBoot 的博客系统,最求轻快,易用,以内容为中心。 Halo,Personal blog system developed using Java.
</description> </description>
<organization> <organization>

View File

@ -13,9 +13,7 @@ import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
/** /**
* <pre> * FreeMarker configuration.
* FreeMarker
* </pre>
* *
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2018/4/26 * @date : 2018/4/26
@ -61,7 +59,7 @@ public class FreeMarkerAutoConfiguration {
public void setSharedVariable() { public void setSharedVariable() {
try { try {
configuration.setSharedVariable("options", optionsService.listOptions()); configuration.setSharedVariable("options", optionsService.listOptions());
//自定义标签 //Freemarker custom tags
configuration.setSharedVariable("categoryTag", categoryTagDirective); configuration.setSharedVariable("categoryTag", categoryTagDirective);
configuration.setSharedVariable("commentTag", commentTagDirective); configuration.setSharedVariable("commentTag", commentTagDirective);
configuration.setSharedVariable("linkTag", linkTagDirective); configuration.setSharedVariable("linkTag", linkTagDirective);

View File

@ -9,8 +9,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered; import org.springframework.core.Ordered;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.lang.NonNull; import org.springframework.lang.NonNull;
@ -23,7 +21,6 @@ import springfox.documentation.service.*;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.spring.web.plugins.JacksonSerializerConvention;
import springfox.documentation.swagger.web.SecurityConfiguration; import springfox.documentation.swagger.web.SecurityConfiguration;
import springfox.documentation.swagger.web.SecurityConfigurationBuilder; import springfox.documentation.swagger.web.SecurityConfigurationBuilder;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@ -137,7 +134,7 @@ public class SwaggerConfiguration {
.title("Halo API Documentation") .title("Halo API Documentation")
.description("Documentation for Halo API") .description("Documentation for Halo API")
.version(HALO_VERSION) .version(HALO_VERSION)
.termsOfServiceUrl("https://ryanc.cc/") .termsOfServiceUrl("https://github.com/halo-dev")
.contact(new Contact("RYAN0UP", "https://ryanc.cc/", "i#ryanc.cc")) .contact(new Contact("RYAN0UP", "https://ryanc.cc/", "i#ryanc.cc"))
.build(); .build();
} }

View File

@ -29,9 +29,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
import java.util.List; import java.util.List;
/** /**
* <pre> * Mvc configuration.
*
* </pre>
* *
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2018/1/2 * @date : 2018/1/2
@ -66,7 +64,7 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
} }
/** /**
* * Configuring static resource path
* *
* @param registry registry * @param registry registry
*/ */
@ -100,6 +98,11 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
registry.addConverterFactory(new StringToEnumConverterFactory()); registry.addConverterFactory(new StringToEnumConverterFactory());
} }
/**
* Configuring freemarker template file path.
*
* @return new FreeMarkerConfigurer
*/
@Bean @Bean
public FreeMarkerConfigurer freemarkerConfig() { public FreeMarkerConfigurer freemarkerConfig() {
FreeMarkerConfigurer configurer = new FreeMarkerConfigurer(); FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
@ -108,6 +111,11 @@ public class WebMvcAutoConfiguration implements WebMvcConfigurer {
return configurer; return configurer;
} }
/**
* Configuring view resolver
*
* @param registry registry
*/
@Override @Override
public void configureViewResolvers(ViewResolverRegistry registry) { public void configureViewResolvers(ViewResolverRegistry registry) {
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver(); FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();

View File

@ -32,9 +32,7 @@ import java.util.Map;
import static cc.ryanc.halo.model.support.HaloConst.DEFAULT_THEME_NAME; import static cc.ryanc.halo.model.support.HaloConst.DEFAULT_THEME_NAME;
/** /**
* <pre> * The method executed after the application is started.
*
* </pre>
* *
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2018/12/5 * @date : 2018/12/5

View File

@ -30,13 +30,13 @@ public class Attachment extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Attachment name.
*/ */
@Column(name = "name", columnDefinition = "varchar(255) not null") @Column(name = "name", columnDefinition = "varchar(255) not null")
private String name; private String name;
/** /**
* * Attachment access path.
*/ */
@Column(name = "path", columnDefinition = "varchar(1023) not null") @Column(name = "path", columnDefinition = "varchar(1023) not null")
private String path; private String path;
@ -48,19 +48,19 @@ public class Attachment extends BaseEntity {
private String fileKey; private String fileKey;
/** /**
* * Thumbnail access path.
*/ */
@Column(name = "thumb_path", columnDefinition = "varchar(1023) default ''") @Column(name = "thumb_path", columnDefinition = "varchar(1023) default ''")
private String thumbPath; private String thumbPath;
/** /**
* * Attachment media type.
*/ */
@Column(name = "media_type", columnDefinition = "varchar(50) not null") @Column(name = "media_type", columnDefinition = "varchar(50) not null")
private String mediaType; private String mediaType;
/** /**
* * Attachment suffix,such as .png,.jpg
*/ */
@Column(name = "suffix", columnDefinition = "varchar(50) default ''") @Column(name = "suffix", columnDefinition = "varchar(50) default ''")
private String suffix; private String suffix;
@ -78,13 +78,13 @@ public class Attachment extends BaseEntity {
private Integer height; private Integer height;
/** /**
* * Attachment size.
*/ */
@Column(name = "size", columnDefinition = "bigint not null") @Column(name = "size", columnDefinition = "bigint not null")
private Long size; private Long size;
/** /**
* * Attachment upload type,LOCAL,UPYUN or QNYUN.
*/ */
@Column(name = "type", columnDefinition = "int default 0") @Column(name = "type", columnDefinition = "int default 0")
private AttachmentType type; private AttachmentType type;

View File

@ -21,21 +21,21 @@ import java.util.Date;
public class BaseEntity { public class BaseEntity {
/** /**
* * Create time.
*/ */
@Column(name = "create_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP") @Column(name = "create_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP")
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date createTime; private Date createTime;
/** /**
* * Update time.
*/ */
@Column(name = "update_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP") @Column(name = "update_time", columnDefinition = "timestamp default CURRENT_TIMESTAMP")
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date updateTime; private Date updateTime;
/** /**
* * Delete flag.
*/ */
@Column(name = "deleted", columnDefinition = "TINYINT default 0") @Column(name = "deleted", columnDefinition = "TINYINT default 0")
private Boolean deleted = false; private Boolean deleted = false;

View File

@ -27,7 +27,7 @@ public class BasePost extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Post title.
*/ */
@Column(name = "title", columnDefinition = "varchar(100) not null") @Column(name = "title", columnDefinition = "varchar(100) not null")
private String title; private String title;
@ -45,67 +45,69 @@ public class BasePost extends BaseEntity {
private String url; private String url;
/** /**
* * Original content,not format.
*/ */
@Column(name = "original_content", columnDefinition = "text not null") @Column(name = "original_content", columnDefinition = "text not null")
private String originalContent; private String originalContent;
/** /**
* * Rendered content.
*
* @see cc.ryanc.halo.utils.MarkdownUtils#renderMarkdown(String)
*/ */
@Column(name = "format_content", columnDefinition = "text not null") @Column(name = "format_content", columnDefinition = "text not null")
private String formatContent; private String formatContent;
/** /**
* * Post summary.
*/ */
@Column(name = "summary", columnDefinition = "varchar(500) default ''") @Column(name = "summary", columnDefinition = "varchar(500) default ''")
private String summary; private String summary;
/** /**
* * Cover thumbnail of the post.
*/ */
@Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''") @Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''")
private String thumbnail; private String thumbnail;
/** /**
* * Post visits.
*/ */
@Column(name = "visits", columnDefinition = "bigint default 0") @Column(name = "visits", columnDefinition = "bigint default 0")
private Long visits; private Long visits;
/** /**
* * Whether to allow comments.
*/ */
@Column(name = "disallow_comment", columnDefinition = "int default 0") @Column(name = "disallow_comment", columnDefinition = "int default 0")
private Boolean disallowComment; private Boolean disallowComment;
/** /**
* * Post password.
*/ */
@Column(name = "password", columnDefinition = "varchar(255) default ''") @Column(name = "password", columnDefinition = "varchar(255) default ''")
private String password; private String password;
/** /**
* * Custom template.
*/ */
@Column(name = "template", columnDefinition = "varchar(255) default ''") @Column(name = "template", columnDefinition = "varchar(255) default ''")
private String template; private String template;
/** /**
* * Whether to top the post.
*/ */
@Column(name = "top_priority", columnDefinition = "int default 0") @Column(name = "top_priority", columnDefinition = "int default 0")
private Integer topPriority; private Integer topPriority;
/** /**
* * Create from,server or WeChat.
*/ */
@Column(name = "create_from", columnDefinition = "int default 0") @Column(name = "create_from", columnDefinition = "int default 0")
private PostCreateFrom createFrom; private PostCreateFrom createFrom;
/** /**
* / * Likes
*/ */
@Column(name = "likes", columnDefinition = "bigint default 0") @Column(name = "likes", columnDefinition = "bigint default 0")
private Long likes; private Long likes;

View File

@ -27,25 +27,25 @@ public class Category extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Category name.
*/ */
@Column(name = "name", columnDefinition = "varchar(50) not null") @Column(name = "name", columnDefinition = "varchar(50) not null")
private String name; private String name;
/** /**
* * Category slug name.
*/ */
@Column(name = "slug_name", columnDefinition = "varchar(50) not null") @Column(name = "slug_name", columnDefinition = "varchar(50) not null")
private String slugName; private String slugName;
/** /**
* * Description,can be display on category page.
*/ */
@Column(name = "description", columnDefinition = "varchar(100) default ''") @Column(name = "description", columnDefinition = "varchar(100) default ''")
private String description; private String description;
/** /**
* * Parent category.
*/ */
@Column(name = "parent_id", columnDefinition = "int default 0") @Column(name = "parent_id", columnDefinition = "int default 0")
private Integer parentId; private Integer parentId;

View File

@ -28,25 +28,25 @@ public class Comment extends BaseEntity {
private Long id; private Long id;
/** /**
* * Commentator's name.
*/ */
@Column(name = "author", columnDefinition = "varchar(50) not null") @Column(name = "author", columnDefinition = "varchar(50) not null")
private String author; private String author;
/** /**
* * Commentator's email.
*/ */
@Column(name = "email", columnDefinition = "varchar(255) default ''") @Column(name = "email", columnDefinition = "varchar(255) default ''")
private String email; private String email;
/** /**
* ip * Commentator's ip address.
*/ */
@Column(name = "ip_address", columnDefinition = "varchar(127) default ''") @Column(name = "ip_address", columnDefinition = "varchar(127) default ''")
private String ipAddress; private String ipAddress;
/** /**
* * Commentator's website.
*/ */
@Column(name = "author_url", columnDefinition = "varchar(512) default ''") @Column(name = "author_url", columnDefinition = "varchar(512) default ''")
private String authorUrl; private String authorUrl;
@ -58,7 +58,7 @@ public class Comment extends BaseEntity {
private String gavatarMd5; private String gavatarMd5;
/** /**
* * Comment content.
*/ */
@Column(name = "content", columnDefinition = "varchar(1023) not null") @Column(name = "content", columnDefinition = "varchar(1023) not null")
private String content; private String content;
@ -70,13 +70,13 @@ public class Comment extends BaseEntity {
private CommentStatus status; private CommentStatus status;
/** /**
* UA * Commentator's userAgent.
*/ */
@Column(name = "user_agent", columnDefinition = "varchar(512) default ''") @Column(name = "user_agent", columnDefinition = "varchar(512) default ''")
private String userAgent; private String userAgent;
/** /**
* * Is admin's comment.
*/ */
@Column(name = "is_admin", columnDefinition = "tinyint default 0") @Column(name = "is_admin", columnDefinition = "tinyint default 0")
private Boolean isAdmin; private Boolean isAdmin;
@ -88,13 +88,13 @@ public class Comment extends BaseEntity {
private Integer postId; private Integer postId;
/** /**
* * Whether to top the comment.
*/ */
@Column(name = "top_priority", columnDefinition = "int default 0") @Column(name = "top_priority", columnDefinition = "int default 0")
private Integer topPriority; private Integer topPriority;
/** /**
* * Parent comment.
*/ */
@Column(name = "parent_id", columnDefinition = "bigint default 0") @Column(name = "parent_id", columnDefinition = "bigint default 0")
private Long parentId; private Long parentId;

View File

@ -30,38 +30,38 @@ public class Gallery extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Picture name.
*/ */
@Column(name = "name", columnDefinition = "varchar(255) not null") @Column(name = "name", columnDefinition = "varchar(255) not null")
private String name; private String name;
/** /**
* * Picture description.
*/ */
@Column(name = "description", columnDefinition = "varchar(255) default ''") @Column(name = "description", columnDefinition = "varchar(255) default ''")
private String description; private String description;
/** /**
* / * Shooting time / creation time.
*/ */
@Column(name = "take_time", columnDefinition = "timestamp not null") @Column(name = "take_time", columnDefinition = "timestamp not null")
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
private Date takeTime; private Date takeTime;
/** /**
* * Picture location.
*/ */
@Column(name = "location", columnDefinition = "varchar(255) default ''") @Column(name = "location", columnDefinition = "varchar(255) default ''")
private String location; private String location;
/** /**
* * Thumbnail
*/ */
@Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''") @Column(name = "thumbnail", columnDefinition = "varchar(1023) default ''")
private String thumbnail; private String thumbnail;
/** /**
* * Picture access path.
*/ */
@Column(name = "url", columnDefinition = "varchar(1023) not null") @Column(name = "url", columnDefinition = "varchar(1023) not null")
private String url; private String url;

View File

@ -29,31 +29,31 @@ public class Link extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Link name.
*/ */
@Column(name = "name", columnDefinition = "varchar(255) not null") @Column(name = "name", columnDefinition = "varchar(255) not null")
private String name; private String name;
/** /**
* * Link website address.
*/ */
@Column(name = "url", columnDefinition = "varchar(255) not null") @Column(name = "url", columnDefinition = "varchar(255) not null")
private String url; private String url;
/** /**
* Logo * Website logo.
*/ */
@Column(name = "logo", columnDefinition = "varchar(255) default ''") @Column(name = "logo", columnDefinition = "varchar(255) default ''")
private String logo; private String logo;
/** /**
* * Website description.
*/ */
@Column(name = "description", columnDefinition = "varchar(255) default ''") @Column(name = "description", columnDefinition = "varchar(255) default ''")
private String description; private String description;
/** /**
* * Link group name.
*/ */
@Column(name = "team", columnDefinition = "varchar(255) default ''") @Column(name = "team", columnDefinition = "varchar(255) default ''")
private String team; private String team;

View File

@ -29,25 +29,25 @@ public class Log extends BaseEntity {
private Long id; private Long id;
/** /**
* * Log key.
*/ */
@Column(name = "log_key", columnDefinition = "varchar(1023) default ''") @Column(name = "log_key", columnDefinition = "varchar(1023) default ''")
private String logKey; private String logKey;
/** /**
* * Log type.
*/ */
@Column(name = "type", columnDefinition = "int not null") @Column(name = "type", columnDefinition = "int not null")
private LogType type; private LogType type;
/** /**
* * Log content.
*/ */
@Column(name = "content", columnDefinition = "varchar(1023) not null") @Column(name = "content", columnDefinition = "varchar(1023) not null")
private String content; private String content;
/** /**
* IP * Operator's ip address.
*/ */
@Column(name = "ip_address", columnDefinition = "varchar(127) default ''") @Column(name = "ip_address", columnDefinition = "varchar(127) default ''")
private String ipAddress; private String ipAddress;

View File

@ -29,31 +29,31 @@ public class Menu extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Menu name.
*/ */
@Column(name = "name", columnDefinition = "varchar(255) not null") @Column(name = "name", columnDefinition = "varchar(255) not null")
private String name; private String name;
/** /**
* * Menu access url.
*/ */
@Column(name = "url", columnDefinition = "varchar(255) not null") @Column(name = "url", columnDefinition = "varchar(255) not null")
private String url; private String url;
/** /**
* * Sort.
*/ */
@Column(name = "sort", columnDefinition = "int default 0") @Column(name = "sort", columnDefinition = "int default 0")
private Integer sort; private Integer sort;
/** /**
* * Page opening method
*/ */
@Column(name = "target", columnDefinition = "varchar(20) default '_self'") @Column(name = "target", columnDefinition = "varchar(20) default '_self'")
private String target; private String target;
/** /**
* * Menu icon,Template support required.
*/ */
@Column(name = "icon", columnDefinition = "varchar(50) default ''") @Column(name = "icon", columnDefinition = "varchar(50) default ''")
private String icon; private String icon;

View File

@ -26,13 +26,13 @@ public class PostCategory extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Category id.
*/ */
@Column(name = "category_id") @Column(name = "category_id")
private Integer categoryId; private Integer categoryId;
/** /**
* * Post id.
*/ */
@Column(name = "post_id") @Column(name = "post_id")
private Integer postId; private Integer postId;

View File

@ -28,13 +28,13 @@ public class PostTag extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Post id.
*/ */
@Column(name = "post_id", columnDefinition = "int not null") @Column(name = "post_id", columnDefinition = "int not null")
private Integer postId; private Integer postId;
/** /**
* * Tag id.
*/ */
@Column(name = "tag_id", columnDefinition = "int not null") @Column(name = "tag_id", columnDefinition = "int not null")
private Integer tagId; private Integer tagId;

View File

@ -29,13 +29,13 @@ public class Tag extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * Tag name.
*/ */
@Column(name = "name", columnDefinition = "varchar(255) not null") @Column(name = "name", columnDefinition = "varchar(255) not null")
private String name; private String name;
/** /**
* * Tag slug name.
*/ */
@Column(name = "slug_name", columnDefinition = "varchar(255) not null") @Column(name = "slug_name", columnDefinition = "varchar(255) not null")
private String slugName; private String slugName;

View File

@ -31,37 +31,37 @@ public class User extends BaseEntity {
private Integer id; private Integer id;
/** /**
* * User name.
*/ */
@Column(name = "username", columnDefinition = "varchar(50) not null") @Column(name = "username", columnDefinition = "varchar(50) not null")
private String username; private String username;
/** /**
* * User nick name,used to display on page.
*/ */
@Column(name = "nickname", columnDefinition = "varchar(255) not null") @Column(name = "nickname", columnDefinition = "varchar(255) not null")
private String nickname; private String nickname;
/** /**
* * Password.
*/ */
@Column(name = "password", columnDefinition = "varchar(255) not null") @Column(name = "password", columnDefinition = "varchar(255) not null")
private String password; private String password;
/** /**
* * User email.
*/ */
@Column(name = "email", columnDefinition = "varchar(127) default ''") @Column(name = "email", columnDefinition = "varchar(127) default ''")
private String email; private String email;
/** /**
* * User avatar.
*/ */
@Column(name = "avatar", columnDefinition = "varchar(1023) default ''") @Column(name = "avatar", columnDefinition = "varchar(1023) default ''")
private String avatar; private String avatar;
/** /**
* * User description.
*/ */
@Column(name = "description", columnDefinition = "varchar(1023) default ''") @Column(name = "description", columnDefinition = "varchar(1023) default ''")
private String description; private String description;

View File

@ -9,6 +9,8 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* Freemarker custom tag of category.
*
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2019/3/22 * @date : 2019/3/22
*/ */

View File

@ -9,6 +9,8 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* Freemarker custom tag of comment.
*
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2019/3/22 * @date : 2019/3/22
*/ */

View File

@ -9,6 +9,8 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* Freemarker custom tag of link.
*
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2019/3/22 * @date : 2019/3/22
*/ */

View File

@ -9,6 +9,8 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* Freemarker custom tag of menu.
*
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2019/3/22 * @date : 2019/3/22
*/ */

View File

@ -11,9 +11,7 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* <pre> * Freemarker custom tag of post.
* FreeMarker
* </pre>
* *
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2018/4/26 * @date : 2018/4/26

View File

@ -9,6 +9,8 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* Freemarker custom tag of tag.
*
* @author : RYAN0UP * @author : RYAN0UP
* @date : 2019/3/22 * @date : 2019/3/22
*/ */

View File

@ -19,26 +19,26 @@ import javax.validation.constraints.Size;
public class CategoryParam implements InputConverter<Category> { public class CategoryParam implements InputConverter<Category> {
/** /**
* * Category name.
*/ */
@NotBlank(message = "Category name must not be blank") @NotBlank(message = "Category name must not be blank")
@Size(max = 50, message = "Length of category name must not be more than {max}") @Size(max = 50, message = "Length of category name must not be more than {max}")
private String name; private String name;
/** /**
* * Category slug name.
*/ */
@Size(max = 50, message = "Length of category slug name must not be more than {max}") @Size(max = 50, message = "Length of category slug name must not be more than {max}")
private String slugName; private String slugName;
/** /**
* * Category description.
*/ */
@Size(max = 100, message = "Length of category description must not be more than {max}") @Size(max = 100, message = "Length of category description must not be more than {max}")
private String description; private String description;
/** /**
* * Parent category.
*/ */
private Integer parentId; private Integer parentId;

View File

@ -23,7 +23,7 @@ public class HaloConst {
/** /**
* version constant * version constant
*/ */
public static final String HALO_VERSION = "0.4.2"; public static final String HALO_VERSION = "1.0.0";
/** /**
* Token of header param * Token of header param

View File

@ -20,7 +20,6 @@
<#-- 不允许修改该主题信息,也不能删除。 --> <#-- 不允许修改该主题信息,也不能删除。 -->
<span>Designed by </span> <span>Designed by </span>
<a href="https://www.caicai.me">CaiCai</a> <a href="https://www.caicai.me">CaiCai</a>
<#-- 虽然Halo使用了宽松的GPL协议但开发不易希望您可以保留一下版权声明。笔芯~ -->
<div class="by_halo"> <div class="by_halo">
<a href="https://github.com/halo-dev/halo" target="_blank">Proudly published with Halo&#65281;</a> <a href="https://github.com/halo-dev/halo" target="_blank">Proudly published with Halo&#65281;</a>
</div> </div>