Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
6d57c7ea
Commit
6d57c7ea
authored
Aug 03, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
428d5486
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
Startup.cs
Mall.WebApi/Startup.cs
+18
-18
No files found.
Mall.WebApi/Startup.cs
View file @
6d57c7ea
...
@@ -77,24 +77,24 @@ namespace Mall.WebApi
...
@@ -77,24 +77,24 @@ namespace Mall.WebApi
};
};
services
.
AddCors
(
options
=>
options
.
AddPolicy
(
"AllowCors"
,
policy
=>
policy
.
AllowAnyHeader
().
AllowAnyMethod
().
AllowCredentials
().
WithOrigins
(
corsArray
.
ToArray
())));
services
.
AddCors
(
options
=>
options
.
AddPolicy
(
"AllowCors"
,
policy
=>
policy
.
AllowAnyHeader
().
AllowAnyMethod
().
AllowCredentials
().
WithOrigins
(
corsArray
.
ToArray
())));
services
.
AddCap
(
x
=>
//
services.AddCap(x =>
{
//
{
x
.
UseMongoDB
(
Common
.
Config
.
Mongo
);
//
x.UseMongoDB(Common.Config.Mongo);
x
.
UseRabbitMQ
(
cfg
=>
//
x.UseRabbitMQ(cfg =>
{
//
{
cfg
.
HostName
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"HostName"
);
//
cfg.HostName = Common.Config.ReadConfigKey("RabbitMqConfig", "HostName");
cfg
.
VirtualHost
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"VirtualHost"
);
//
cfg.VirtualHost = Common.Config.ReadConfigKey("RabbitMqConfig", "VirtualHost");
cfg
.
Port
=
Convert
.
ToInt32
(
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"Port"
));
//
cfg.Port = Convert.ToInt32(Common.Config.ReadConfigKey("RabbitMqConfig", "Port"));
cfg
.
UserName
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"UserName"
);
//
cfg.UserName = Common.Config.ReadConfigKey("RabbitMqConfig", "UserName");
cfg
.
Password
=
Common
.
Config
.
ReadConfigKey
(
"RabbitMqConfig"
,
"Password"
);
//
cfg.Password = Common.Config.ReadConfigKey("RabbitMqConfig", "Password");
});
//
});
//失败后的重试次数,默认50次;在FailedRetryInterval默认60秒的情况下,即默认重试50*60秒(50分钟)之后放弃失败重试
//
//失败后的重试次数,默认50次;在FailedRetryInterval默认60秒的情况下,即默认重试50*60秒(50分钟)之后放弃失败重试
x
.
FailedRetryCount
=
10
;
//
x.FailedRetryCount = 10;
//失败后的重拾间隔,默认60秒
//
//失败后的重拾间隔,默认60秒
x
.
FailedRetryInterval
=
10
;
//
x.FailedRetryInterval = 10;
//设置成功信息的删除时间默认24*3600秒
//
//设置成功信息的删除时间默认24*3600秒
x
.
SucceedMessageExpiredAfter
=
3600
;
//
x.SucceedMessageExpiredAfter = 3600;
});
//
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment