diff --git a/ServiceTests/ServiceTests.csproj b/ServiceTests/ServiceTests.csproj deleted file mode 100644 index fb506fbc..00000000 --- a/ServiceTests/ServiceTests.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - net6.0 - enable - enable - - false - true - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - diff --git a/ServiceTests/UnitTest1.cs b/ServiceTests/UnitTest1.cs deleted file mode 100644 index 02f867a0..00000000 --- a/ServiceTests/UnitTest1.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace ServiceTests -{ - public class UnitTest1 - { - [Fact] - public void Test1() - { - - } - } -} \ No newline at end of file diff --git a/ServiceTests/Usings.cs b/ServiceTests/Usings.cs deleted file mode 100644 index 8c927eb7..00000000 --- a/ServiceTests/Usings.cs +++ /dev/null @@ -1 +0,0 @@ -global using Xunit; \ No newline at end of file diff --git a/ServiceTests/appsettings.json b/ServiceTests/appsettings.json deleted file mode 100644 index f31fae20..00000000 --- a/ServiceTests/appsettings.json +++ /dev/null @@ -1,271 +0,0 @@ -{ - "AllowedHosts": "*", - "Logging": { - "LogLevel": { - "Default": "Information", //加入Default否则log4net本地写入不了日志 - "Admin.Core.Extensions.ApiResponseHandler": "Error" - }, - "Debug": { - "LogLevel": { - "Default": "Warning" - } - }, - "Console": { - "LogLevel": { - "Default": "Warning", - "Microsoft.Hosting.Lifetime": "Debug" - } - }, - "Log4Net": { - "Name": "Admin.Core" - } - }, - "AppSettings": { - "RedisCachingAOP": { - "Enabled": false, - "ConnectionString": "" - }, - "MemoryCachingAOP": { - "Enabled": false - }, - "LogAOP": { - "Enabled": false - }, - "TranAOP": { - "Enabled": false - }, - "SqlAOP": { - "Enabled": false, - "OutToLogFile": { - "Enabled": false - }, - "OutToConsole": { - "Enabled": false - } - }, - "FileRootPath": "/file/", - "Date": "2018-08-28", - "Author": "Admin.Core", - "UseLoadTest": true, - "CacheTimeOut": 60, //服务器本地缓存过期时间:分钟 - "ApiRoot": "http://localhost:55014" - }, - "Audience": { - "Secret": "dk6Vv3oTuo2OMU18w86E3j11DtM7RUX5icQtA0DCKuhYDRUqBLIiL", //不要太短,16位+ - "SecretFile": "E:\\my-file\\admin.core.audience.secret.txt", //安全,内容就是Secret - "Issuer": "Admin.Core", - "Audience": "wr", - "Expiration": "6000000" //接口的过期时间 - }, - - // 请配置MainDB为你想要的主库的ConnId值,并设置对应的Enabled为true; - // *** 单库操作,把 MutiDBEnabled 设为false ***; - // *** 多库操作,把 MutiDBEnabled 设为true,其他的从库Enabled也为true **; - // 具体配置看视频:https://www.bilibili.com/video/BV1BJ411B7mn?p=6 - "MainDB": "AUCMA_SCADA", //当前项目的主库,所对应的连接字符串的Enabled必须为true - "MutiDBEnabled": true, //是否开启多库模式 - "CQRSEnabled": false, //是否开启读写分离模式,必须是单库模式,且数据库类型一致,比如都是SqlServer - "DBS": [ - /* - 对应下边的 DBType - MySql = 0, - SqlServer = 1, - Sqlite = 2, - Oracle = 3, - PostgreSQL = 4, - Dm = 5,//达梦 - Kdbndp = 6,//人大金仓 - */ - { - "ConnId": "AUCMA_SCADA", - "DBType": 3, - "Enabled": true, - "HitRate": 50, - //"Connection": "Data Source=localhost;Initial Catalog=Hsdb;User ID=sa;Password=sa;Integrated Security=false;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", - "Connection": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=175.27.215.92)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=helowin)));User ID=aucma_scada;Password=aucma;", - "ProviderName": "System.Data.SqlClient" - }, - { - "ConnId": "AUCMA_MES", - "DBType": 3, - "Enabled": true, - "HitRate": 40, - "Connection": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=175.27.215.92)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=helowin)));User ID=aucma_mes;Password=aucma;", - "ProviderName": "System.Data.SqlClient" - } - ], - "QuartzNetJob": [ - { - "ID": 1, - "Name": "TestTask", - "JobGroup": "DEFAULT", - "Cron": "*/1 * * * * ?", - "AssemblyName": "Admin.Core.Tasks", - "ClassName": "Job_Admin_Quartz", - "Remark": "执行任务调度系统", - "RunTimes": 3881, - "BeginTime": "2023-04-23 11:08:50.000", - "EndTime": "2324-08-06 16:45:30.000", - "TriggerType": 1, - "IntervalSecond": 1, - "CycleRunTimes": 1, - "IsStart": true, - "JobParams": null, - "DelFlag": false, - "CreateBy": "admin", - "CreateTime": "2023-04-23 11:09:22.0000000", - "UpdateBy": "admin", - "UpdateTime": "2023-08-07 16:45:45.0530000" - }, - { - "ID": 2, - "Name": "TestTask", - "JobGroup": "DEFAULT", - "Cron": "*/1 * * * * ?", - "AssemblyName": "Admin.Core.Tasks", - "ClassName": "Job_TestTask_Quartz", - "Remark": "执行任务调度系统", - "RunTimes": 3881, - "BeginTime": "2023-04-23 11:08:50.000", - "EndTime": "2324-08-06 16:45:30.000", - "TriggerType": 1, - "IntervalSecond": 1, - "CycleRunTimes": 1, - "IsStart": true, - "JobParams": null, - "DelFlag": false, - "CreateBy": "admin", - "CreateTime": "2023-04-23 11:09:22.0000000", - "UpdateBy": "admin", - "UpdateTime": "2023-08-07 16:45:45.0530000" - }, - { - "ID": 3, - "Name": "PQInStoreTask", - "JobGroup": "DEFAULT", - "Cron": "*/15 * * * * ?", - "AssemblyName": "Admin.Core.Tasks", - "ClassName": "Job_PQInStoreTask_Quartz", - "Remark": "泡前库入库调度任务", - "RunTimes": 3881, - "BeginTime": "2023-04-23 11:08:50.000", - "EndTime": "2324-08-06 16:45:30.000", - "TriggerType": 1, - "IntervalSecond": 1, - "CycleRunTimes": 1, - "IsStart": true, - "JobParams": null, - "DelFlag": false, - "CreateBy": "admin", - "CreateTime": "2023-04-23 11:09:22.0000000", - "UpdateBy": "admin", - "UpdateTime": "2023-08-07 16:45:45.0530000" - } - ], - "StoreInfo": { - "BeforeStoreCode": "PBSCK-001", - "AfterStoreCode": "FPJCK-001" - }, - "Startup": { - "Cors": { - "PolicyName": "CorsIpAccess", //策略名称 - "EnableAllIPs": true, //当为true时,开放所有IP均可访问。 - // 支持多个域名端口,注意端口号后不要带/斜杆:比如localhost:8000/,是错的 - // 注意,http://127.0.0.1:1818 和 http://localhost:1818 是不一样的 - "IPs": "http://localhost:81,http://127.0.0.1:81" - }, - "AppConfigAlert": { - "Enabled": true - }, - "ApiName": "Admin.Core", - "IdentityServer4": { - "Enabled": false, // 这里默认是false,表示使用jwt,如果设置为true,则表示系统使用Ids4模式 - "AuthorizationUrl": "http://localhost:5004", // 认证中心域名 - "ApiName": "admin.core.api" // 资源服务器 - }, - "RedisMq": { - "Enabled": false //redis 消息队列 - }, - "MiniProfiler": { - "Enabled": false //性能分析开启 - }, - "Nacos": { - "Enabled": false //Nacos注册中心 - } - }, - "Redis": { - //"ConnectionString": "127.0.0.1:6379" - "ConnectionString": "127.0.0.1:6379" - }, - "RabbitMQ": { - "Enabled": true, - "Connection": "http://localhost:15672/", - "UserName": "robin", - "Password": "123456", - "RetryCount": 3 - }, - "EventBus": { - "Enabled": true, - "SubscriptionClientName": "Admin.Core" - }, - "Middleware": { - "QuartzNetJob": { - "Enabled": true - }, - "Scanner": { //扫码器 - "Enabled": true - }, - "Melsec": { - "ConString": "10.10.92.30", - "Port": 6000, - "Enabled": true - } - }, - "IpRateLimiting": { - "EnableEndpointRateLimiting": false, //False: globally executed, true: executed for each - "StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter - "RealIpHeader": "X-Real-IP", - "ClientIdHeader": "X-ClientId", - "IpWhitelist": [], //白名单 - "EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ], - "ClientWhitelist": [ "dev-client-1", "dev-client-2" ], - "QuotaExceededResponse": { - "Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}", - "ContentType": "application/json", - "StatusCode": 429 - }, - "HttpStatusCode": 429, //返回状态码 - "GeneralRules": [ //api规则,结尾一定要带* - { - "Endpoint": "*:/api/Admin*", - "Period": "1m", - "Limit": 20 - }, - { - "Endpoint": "*/api/*", - "Period": "1s", - "Limit": 3 - }, - { - "Endpoint": "*/api/*", - "Period": "1m", - "Limit": 30 - }, - { - "Endpoint": "*/api/*", - "Period": "12h", - "Limit": 500 - } - ] - }, - "LogFiedOutPutConfigs": { - "tcpAddressHost": "", // 输出elk的tcp连接地址 - "tcpAddressPort": 0, // 输出elk的tcp端口号 - "ConfigsInfo": [ // 配置的输出elk节点内容 常用语动态标识 - { - "FiedName": "applicationName", - "FiedValue": "Admin.Core.Api" - } - ] - } -}