Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions app/src/main/java/com/tinyengine/it/config/filter/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,31 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.cors.reactive.CorsWebFilter;
import org.springframework.web.reactive.config.WebFluxConfigurer;

import java.util.Arrays;
import java.util.List;

@Configuration
public class WebConfig implements WebMvcConfigurer {
public class WebConfig implements WebFluxConfigurer {
@Value("${cors.allowed-origins}")
private String allowedOrigins;

@Bean
public CorsFilter corsFilter() {
// 跨域配置地址
public CorsWebFilter corsFilter() {
List<String> crosDomainList = Arrays.asList(allowedOrigins.split(","));

CorsConfiguration corsConfiguration = new CorsConfiguration();
// 1、允许来源
corsConfiguration.setAllowedOriginPatterns(crosDomainList);
// 2、允许任何请求头
corsConfiguration.addAllowedHeader(CorsConfiguration.ALL);
// 3、允许任何方法
corsConfiguration.addAllowedMethod(CorsConfiguration.ALL);
// 4、允许凭证
corsConfiguration.setAllowCredentials(true);

UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource source =
new org.springframework.web.cors.reactive.UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", corsConfiguration);
return new CorsFilter(source);

return new CorsWebFilter(source);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.Result;
import com.tinyengine.it.model.entity.AppExtension;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface App extension service.
*
* @since 2024-10-20
*/
public interface AppExtensionService {
public interface AppExtensionService extends IService<AppExtension> {
/**
* 查询表t_app_extension所有信息
*
Expand All @@ -38,7 +37,7 @@ public interface AppExtensionService {
* @param id the id
* @return the app extension
*/
AppExtension findAppExtensionById(@Param("id") Integer id);
AppExtension findAppExtensionById(Integer id);

/**
* 根据条件查询表t_app_extension信息
Expand All @@ -54,7 +53,7 @@ public interface AppExtensionService {
* @param id the id
* @return the result
*/
Result<AppExtension> deleteAppExtensionById(@Param("id") Integer id);
Result<AppExtension> deleteAppExtensionById(Integer id);

/**
* 根据主键id更新表t_app_extension信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.Result;
import com.tinyengine.it.model.dto.I18nEntryDto;
import com.tinyengine.it.model.dto.PreviewDto;
import com.tinyengine.it.model.dto.SchemaI18n;
import com.tinyengine.it.model.entity.App;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface App service.
*
* @since 2024-10-20
*/
public interface AppService {
public interface AppService extends IService<App> {
/**
* 查询表t_app所有信息
*
Expand All @@ -41,7 +40,7 @@ public interface AppService {
* @param id the id
* @return the result
*/
Result<App> queryAppById(@Param("id") Integer id);
Result<App> queryAppById(Integer id);

/**
* 根据条件查询表t_app信息
Expand All @@ -57,7 +56,7 @@ public interface AppService {
* @param id the id
* @return the result
*/
Result<App> deleteAppById(@Param("id") Integer id);
Result<App> deleteAppById(Integer id);

/**
* 根据主键id更新表t_app信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,25 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.Result;
import com.tinyengine.it.model.entity.Datasource;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface Datasource service.
*
* @since 2024-10-20
*/
public interface DatasourceService {
public interface DatasourceService extends IService<Datasource> {
/**
* 根据主键id查询表t_datasource信息
*
* @param id the id
* @return the datasource
*/
Datasource queryDatasourceById(@Param("id") Integer id);
Datasource queryDatasourceById(Integer id);

/**
* 根据条件查询表t_datasource信息
Expand All @@ -47,7 +46,7 @@ public interface DatasourceService {
* @param id the id
* @return the result
*/
Result<Datasource> deleteDatasourceById(@Param("id") Integer id);
Result<Datasource> deleteDatasourceById(Integer id);

/**
* 根据主键id更新表t_datasource信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.Result;
import com.tinyengine.it.model.dto.DeleteI18nEntry;
import com.tinyengine.it.model.dto.FileResult;
Expand All @@ -22,7 +23,6 @@
import com.tinyengine.it.model.dto.SchemaI18n;
import com.tinyengine.it.model.entity.I18nEntry;

import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
Expand All @@ -32,7 +32,7 @@
*
* @since 2024-10-20
*/
public interface I18nEntryService {
public interface I18nEntryService extends IService<I18nEntry> {
/**
* 查询表t_i18n_entry所有信息
*
Expand All @@ -46,7 +46,7 @@ public interface I18nEntryService {
* @param id the id
* @return the 18 n entry
*/
I18nEntryDto findI18nEntryById(@Param("id") Integer id);
I18nEntryDto findI18nEntryById(Integer id);

/**
* 根据条件查询表t_i18n_entry信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.model.entity.I18nLang;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface 18 n lang service.
*
* @since 2024-10-20
*/
public interface I18nLangService {
public interface I18nLangService extends IService<I18nLang> {
/**
* 查询表t_i18n_lang所有信息
*
Expand All @@ -37,7 +36,7 @@ public interface I18nLangService {
* @param id the id
* @return the 18 n lang
*/
I18nLang queryI18nLangById(@Param("id") Integer id);
I18nLang queryI18nLangById(Integer id);

/**
* 根据条件查询表t_i18n_lang信息
Expand All @@ -53,7 +52,7 @@ public interface I18nLangService {
* @param id the id
* @return the integer
*/
Integer deleteI18nLangById(@Param("id") Integer id);
Integer deleteI18nLangById(Integer id);

/**
* 根据主键id更新表t_i18n_lang信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@
package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.PageQueryVo;
import com.tinyengine.it.model.dto.PublishedPageVo;
import com.tinyengine.it.model.entity.PageHistory;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface Page history service.
*
* @since 2024-10-20
*/
public interface PageHistoryService {
public interface PageHistoryService extends IService<PageHistory> {
/**
* 查询表t_page_history所有信息
*
Expand Down Expand Up @@ -56,7 +55,7 @@ public interface PageHistoryService {
* @param id the id
* @return the integer
*/
Integer deletePageHistoryById(@Param("id") Integer id);
Integer deletePageHistoryById(Integer id);

/**
* 根据主键id更新表t_page_history信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.Result;
import com.tinyengine.it.model.dto.PreviewDto;
import com.tinyengine.it.model.dto.PreviewParam;
import com.tinyengine.it.model.entity.Page;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface Page service.
*
* @since 2024-10-20
*/
public interface PageService {
public interface PageService extends IService<Page> {
/**
* 查询表t_page所有信息
*
Expand All @@ -41,7 +40,7 @@ public interface PageService {
* @param id the id
* @return the page
*/
Page queryPageById(@Param("id") Integer id);
Page queryPageById(Integer id);

/**
* 根据条件查询表t_page信息
Expand All @@ -57,7 +56,7 @@ public interface PageService {
* @param id the id
* @return the result
*/
Result<Page> delPage(@Param("id") Integer id);
Result<Page> delPage(Integer id);

/**
* 创建页面
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.common.base.Result;
import com.tinyengine.it.model.entity.PageTemplate;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface Page template service.
*
* @since 2024-10-20
*/
public interface PageTemplateService {
public interface PageTemplateService extends IService<PageTemplate> {
/**
* 查询表page_template所有信息
*
Expand All @@ -40,7 +39,7 @@ public interface PageTemplateService {
* @param id the id
* @return the page template
*/
Result<PageTemplate> queryPageTemplateById(@Param("id") Integer id);
Result<PageTemplate> queryPageTemplateById(Integer id);

/**
* 根据条件查询表page_template信息
Expand All @@ -56,7 +55,7 @@ public interface PageTemplateService {
* @param ids id
* @return the integer
*/
Result<Integer> deletePageTemplateByIds(@Param("ids") List<Integer> ids);
Result<Integer> deletePageTemplateByIds(List<Integer> ids);

/**
* 根据主键id更新表page_template信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@

package com.tinyengine.it.service.app;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tinyengine.it.model.entity.TaskRecord;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* The interface Task record service.
*
* @since 2024-10-20
*/
public interface TaskRecordService {
public interface TaskRecordService extends IService<TaskRecord> {
/**
* 查询表t_task_record所有信息
*
Expand All @@ -37,7 +36,7 @@ public interface TaskRecordService {
* @param id the id
* @return the task record
*/
TaskRecord queryTaskRecordById(@Param("id") Integer id);
TaskRecord queryTaskRecordById(Integer id);

/**
* 根据条件查询表t_task_record信息
Expand All @@ -53,7 +52,7 @@ public interface TaskRecordService {
* @param id the id
* @return the integer
*/
Integer deleteTaskRecordById(@Param("id") Integer id);
Integer deleteTaskRecordById(Integer id);

/**
* 根据主键id更新表t_task_record信息
Expand Down
Loading
Loading