style: 格式化代码
This commit is contained in:
@@ -2,7 +2,6 @@ package cn.hamster3.application.blog;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||||
|
|
||||||
@EnableJpaAuditing
|
@EnableJpaAuditing
|
||||||
|
@@ -17,7 +17,7 @@ public class DevSecurityConfiguration {
|
|||||||
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||||
log.info("development environment security settings enabled.");
|
log.info("development environment security settings enabled.");
|
||||||
return http.authorizeHttpRequests(request -> request
|
return http.authorizeHttpRequests(request -> request
|
||||||
.anyRequest().permitAll())
|
.anyRequest().permitAll())
|
||||||
.cors().and()
|
.cors().and()
|
||||||
.csrf().disable()
|
.csrf().disable()
|
||||||
.formLogin()
|
.formLogin()
|
||||||
@@ -26,7 +26,7 @@ public class DevSecurityConfiguration {
|
|||||||
.and()
|
.and()
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public WebMvcConfigurer corsConfigurer() {
|
public WebMvcConfigurer corsConfigurer() {
|
||||||
log.info("add cors configuration...");
|
log.info("add cors configuration...");
|
||||||
@@ -34,11 +34,11 @@ public class DevSecurityConfiguration {
|
|||||||
@Override
|
@Override
|
||||||
public void addCorsMappings(CorsRegistry registry) {
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
registry.addMapping("/**")
|
registry.addMapping("/**")
|
||||||
.allowedOriginPatterns("*")
|
.allowedOriginPatterns("*")
|
||||||
.allowedMethods("*")
|
.allowedMethods("*")
|
||||||
.allowedHeaders("*")
|
.allowedHeaders("*")
|
||||||
.allowCredentials(true)
|
.allowCredentials(true)
|
||||||
.maxAge(3600);
|
.maxAge(3600);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -16,12 +16,12 @@ public class SecurityConfiguration {
|
|||||||
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
||||||
log.info("production environment security settings enabled.");
|
log.info("production environment security settings enabled.");
|
||||||
return http.authorizeHttpRequests(request -> request
|
return http.authorizeHttpRequests(request -> request
|
||||||
.requestMatchers(HttpMethod.GET, "/", "/index", "/index.html").permitAll()
|
.requestMatchers(HttpMethod.GET, "/", "/index", "/index.html").permitAll()
|
||||||
.requestMatchers(HttpMethod.GET, "/favicon.ico", "/assets/**").permitAll()
|
.requestMatchers(HttpMethod.GET, "/favicon.ico", "/assets/**").permitAll()
|
||||||
.requestMatchers(HttpMethod.GET, "/register", "/login").permitAll()
|
.requestMatchers(HttpMethod.GET, "/register", "/login").permitAll()
|
||||||
.requestMatchers(HttpMethod.GET, "/swagger-ui/**", "v3/api-docs/**").permitAll()
|
.requestMatchers(HttpMethod.GET, "/swagger-ui/**", "v3/api-docs/**").permitAll()
|
||||||
.requestMatchers(HttpMethod.POST, "/api/v1/user/").anonymous()
|
.requestMatchers(HttpMethod.POST, "/api/v1/user/").anonymous()
|
||||||
.anyRequest().authenticated())
|
.anyRequest().authenticated())
|
||||||
.cors().and()
|
.cors().and()
|
||||||
.csrf().disable()
|
.csrf().disable()
|
||||||
.formLogin()
|
.formLogin()
|
||||||
|
@@ -0,0 +1,21 @@
|
|||||||
|
package cn.hamster3.application.blog.controller;
|
||||||
|
|
||||||
|
import cn.hamster3.application.blog.vo.ResponseVO;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站设置相关接口
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/api/v1/settings", produces = MediaType.APPLICATION_JSON_VALUE)
|
||||||
|
public class SiteSettingController {
|
||||||
|
@GetMapping("/{path}/")
|
||||||
|
public ResponseVO<String> getSiteTitle(@PathVariable String path) {
|
||||||
|
return ResponseVO.success(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -6,7 +6,6 @@ import lombok.Setter;
|
|||||||
import org.springframework.data.annotation.CreatedDate;
|
import org.springframework.data.annotation.CreatedDate;
|
||||||
import org.springframework.data.annotation.LastModifiedDate;
|
import org.springframework.data.annotation.LastModifiedDate;
|
||||||
|
|
||||||
import java.sql.Blob;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
@@ -6,7 +6,6 @@ import lombok.Setter;
|
|||||||
import org.springframework.data.annotation.CreatedDate;
|
import org.springframework.data.annotation.CreatedDate;
|
||||||
import org.springframework.data.annotation.LastModifiedDate;
|
import org.springframework.data.annotation.LastModifiedDate;
|
||||||
|
|
||||||
import java.sql.Blob;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
@@ -5,11 +5,12 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.annotations.JdbcTypeCode;
|
import org.hibernate.annotations.JdbcTypeCode;
|
||||||
import org.hibernate.type.SqlTypes;
|
import org.hibernate.type.SqlTypes;
|
||||||
import org.springframework.data.annotation.CreatedBy;
|
|
||||||
import org.springframework.data.annotation.CreatedDate;
|
import org.springframework.data.annotation.CreatedDate;
|
||||||
import org.springframework.data.annotation.LastModifiedDate;
|
import org.springframework.data.annotation.LastModifiedDate;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 博文实体
|
* 博文实体
|
||||||
|
@@ -1,11 +1,13 @@
|
|||||||
spring:
|
spring:
|
||||||
|
banner:
|
||||||
|
location: "classpath:/banner-dev.txt"
|
||||||
jpa:
|
jpa:
|
||||||
hibernate:
|
hibernate:
|
||||||
# 自动创建 Entity 类的数据库表
|
# 自动创建 Entity 类的数据库表
|
||||||
ddl-auto: update
|
ddl-auto: update
|
||||||
# open-in-view: true
|
# open-in-view: true
|
||||||
show-ddl: true
|
show-ddl: true
|
||||||
# show-sql: true
|
# show-sql: true
|
||||||
autoconfigure:
|
autoconfigure:
|
||||||
exclude:
|
exclude:
|
||||||
# - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
# - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
||||||
|
@@ -42,5 +42,6 @@ tasks.register("npmDev", NpmTask) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("clean") {
|
tasks.register("clean") {
|
||||||
file("dist").deleteDir()
|
file('bin').deleteDir()
|
||||||
|
file('dist').deleteDir()
|
||||||
}
|
}
|
||||||
|
213
blog-frontend/src/api-base/apis/attach-controller-api.ts
Normal file
213
blog-frontend/src/api-base/apis/attach-controller-api.ts
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||||
|
import { Configuration } from '../configuration';
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||||
|
import { AttachAttachIDBody } from '../models';
|
||||||
|
import { ResponseVOVoid } from '../models';
|
||||||
|
import { V1AttachBody } from '../models';
|
||||||
|
/**
|
||||||
|
* AttachControllerApi - axios parameter creator
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const AttachControllerApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {V1AttachBody} body
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
createAttach: async (body: V1AttachBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'body' is not null or undefined
|
||||||
|
if (body === null || body === undefined) {
|
||||||
|
throw new RequiredError('body','Required parameter body was null or undefined when calling createAttach.');
|
||||||
|
}
|
||||||
|
const localVarPath = `/api/v1/attach/`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||||
|
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {AttachAttachIDBody} body
|
||||||
|
* @param {string} attachID
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
modifyAttach: async (body: AttachAttachIDBody, attachID: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'body' is not null or undefined
|
||||||
|
if (body === null || body === undefined) {
|
||||||
|
throw new RequiredError('body','Required parameter body was null or undefined when calling modifyAttach.');
|
||||||
|
}
|
||||||
|
// verify required parameter 'attachID' is not null or undefined
|
||||||
|
if (attachID === null || attachID === undefined) {
|
||||||
|
throw new RequiredError('attachID','Required parameter attachID was null or undefined when calling modifyAttach.');
|
||||||
|
}
|
||||||
|
const localVarPath = `/api/v1/attach/{attachID}/`
|
||||||
|
.replace(`{${"attachID"}}`, encodeURIComponent(String(attachID)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||||
|
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AttachControllerApi - functional programming interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const AttachControllerApiFp = function(configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {V1AttachBody} body
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async createAttach(body: V1AttachBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
|
||||||
|
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).createAttach(body, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {AttachAttachIDBody} body
|
||||||
|
* @param {string} attachID
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async modifyAttach(body: AttachAttachIDBody, attachID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOVoid>>> {
|
||||||
|
const localVarAxiosArgs = await AttachControllerApiAxiosParamCreator(configuration).modifyAttach(body, attachID, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AttachControllerApi - factory interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const AttachControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {V1AttachBody} body
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async createAttach(body: V1AttachBody, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
|
||||||
|
return AttachControllerApiFp(configuration).createAttach(body, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {AttachAttachIDBody} body
|
||||||
|
* @param {string} attachID
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async modifyAttach(body: AttachAttachIDBody, attachID: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOVoid>> {
|
||||||
|
return AttachControllerApiFp(configuration).modifyAttach(body, attachID, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AttachControllerApi - object-oriented interface
|
||||||
|
* @export
|
||||||
|
* @class AttachControllerApi
|
||||||
|
* @extends {BaseAPI}
|
||||||
|
*/
|
||||||
|
export class AttachControllerApi extends BaseAPI {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {V1AttachBody} body
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof AttachControllerApi
|
||||||
|
*/
|
||||||
|
public async createAttach(body: V1AttachBody, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
|
||||||
|
return AttachControllerApiFp(this.configuration).createAttach(body, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {AttachAttachIDBody} body
|
||||||
|
* @param {string} attachID
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof AttachControllerApi
|
||||||
|
*/
|
||||||
|
public async modifyAttach(body: AttachAttachIDBody, attachID: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOVoid>> {
|
||||||
|
return AttachControllerApiFp(this.configuration).modifyAttach(body, attachID, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
}
|
116
blog-frontend/src/api-base/apis/site-setting-controller-api.ts
Normal file
116
blog-frontend/src/api-base/apis/site-setting-controller-api.ts
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||||
|
import { Configuration } from '../configuration';
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||||
|
import { ResponseVOString } from '../models';
|
||||||
|
/**
|
||||||
|
* SiteSettingControllerApi - axios parameter creator
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const SiteSettingControllerApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
getSiteTitle: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/v1/settings/title`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SiteSettingControllerApi - functional programming interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const SiteSettingControllerApiFp = function(configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async getSiteTitle(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ResponseVOString>>> {
|
||||||
|
const localVarAxiosArgs = await SiteSettingControllerApiAxiosParamCreator(configuration).getSiteTitle(options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SiteSettingControllerApi - factory interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const SiteSettingControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async getSiteTitle(options?: AxiosRequestConfig): Promise<AxiosResponse<ResponseVOString>> {
|
||||||
|
return SiteSettingControllerApiFp(configuration).getSiteTitle(options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SiteSettingControllerApi - object-oriented interface
|
||||||
|
* @export
|
||||||
|
* @class SiteSettingControllerApi
|
||||||
|
* @extends {BaseAPI}
|
||||||
|
*/
|
||||||
|
export class SiteSettingControllerApi extends BaseAPI {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SiteSettingControllerApi
|
||||||
|
*/
|
||||||
|
public async getSiteTitle(options?: AxiosRequestConfig) : Promise<AxiosResponse<ResponseVOString>> {
|
||||||
|
return SiteSettingControllerApiFp(this.configuration).getSiteTitle(options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
}
|
26
blog-frontend/src/api-base/models/attach-attach-idbody.ts
Normal file
26
blog-frontend/src/api-base/models/attach-attach-idbody.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface AttachAttachIDBody
|
||||||
|
*/
|
||||||
|
export interface AttachAttachIDBody {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {Blob}
|
||||||
|
* @memberof AttachAttachIDBody
|
||||||
|
*/
|
||||||
|
file?: Blob;
|
||||||
|
}
|
@@ -0,0 +1,39 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
import { UserInfoResponseVO } from './user-info-response-vo';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ResponseVOListUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
export interface ResponseVOListUserInfoResponseVO {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof ResponseVOListUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
code?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ResponseVOListUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
msg?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {Array<UserInfoResponseVO>}
|
||||||
|
* @memberof ResponseVOListUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
data?: Array<UserInfoResponseVO>;
|
||||||
|
}
|
38
blog-frontend/src/api-base/models/response-vostring.ts
Normal file
38
blog-frontend/src/api-base/models/response-vostring.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ResponseVOString
|
||||||
|
*/
|
||||||
|
export interface ResponseVOString {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof ResponseVOString
|
||||||
|
*/
|
||||||
|
code?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ResponseVOString
|
||||||
|
*/
|
||||||
|
msg?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ResponseVOString
|
||||||
|
*/
|
||||||
|
data?: string;
|
||||||
|
}
|
@@ -0,0 +1,39 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
import { UserInfoResponseVO } from './user-info-response-vo';
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ResponseVOUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
export interface ResponseVOUserInfoResponseVO {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof ResponseVOUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
code?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ResponseVOUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
msg?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {UserInfoResponseVO}
|
||||||
|
* @memberof ResponseVOUserInfoResponseVO
|
||||||
|
*/
|
||||||
|
data?: UserInfoResponseVO;
|
||||||
|
}
|
20
blog-frontend/src/api-base/models/user-info-response-vo.ts
Normal file
20
blog-frontend/src/api-base/models/user-info-response-vo.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface UserInfoResponseVO
|
||||||
|
*/
|
||||||
|
export interface UserInfoResponseVO {
|
||||||
|
}
|
20
blog-frontend/src/api-base/models/user-modify-require-vo.ts
Normal file
20
blog-frontend/src/api-base/models/user-modify-require-vo.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface UserModifyRequireVO
|
||||||
|
*/
|
||||||
|
export interface UserModifyRequireVO {
|
||||||
|
}
|
26
blog-frontend/src/api-base/models/v1-attach-body.ts
Normal file
26
blog-frontend/src/api-base/models/v1-attach-body.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* OpenAPI definition
|
||||||
|
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: v0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface V1AttachBody
|
||||||
|
*/
|
||||||
|
export interface V1AttachBody {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {Blob}
|
||||||
|
* @memberof V1AttachBody
|
||||||
|
*/
|
||||||
|
file?: Blob;
|
||||||
|
}
|
55
blog-frontend/src/components/BlogComponent.vue
Normal file
55
blog-frontend/src/components/BlogComponent.vue
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
defineProps<{
|
||||||
|
i: number
|
||||||
|
}>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-card class="box-card">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<p class="">{{ '博客文章 ' + i }}</p>
|
||||||
|
<p class="text-center">
|
||||||
|
<el-avatar :size="24" src="/favicon.ico" /> {{ '叁只仓鼠 发表于:2023年3月' + i +
|
||||||
|
'日16:00:00' }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div>
|
||||||
|
<p v-for="o in 4" :key="o" class="text item">{{ '博客文章 ' + i + ' 第 ' + o + ' 行内容' }}</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p class="text-center">
|
||||||
|
<el-avatar :size="24" src="/favicon.ico" /> {{ '叁只仓鼠 最后修改于:2023年3月' + i +
|
||||||
|
'日16:00:00' }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center * {
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-card {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
11
blog-frontend/src/views/LoginView.vue
Normal file
11
blog-frontend/src/views/LoginView.vue
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
11
blog-frontend/src/views/RegisterView.vue
Normal file
11
blog-frontend/src/views/RegisterView.vue
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
Reference in New Issue
Block a user