Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
tsai
CAP
Commits
6e33a1a7
Commit
6e33a1a7
authored
Oct 09, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sample.
parent
0a94921e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
20 deletions
+5
-20
Program.cs
samples/Sample.RabbitMQ.MySql/Program.cs
+5
-12
Startup.cs
samples/Sample.RabbitMQ.MySql/Startup.cs
+0
-8
No files found.
samples/Sample.RabbitMQ.MySql/Program.cs
View file @
6e33a1a7
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.IO
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Microsoft.AspNetCore
;
using
Microsoft.AspNetCore.Builder
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.Extensions.Configuration
;
...
...
@@ -13,20 +14,12 @@ namespace Sample.RabbitMQ.MySql
{
public
static
void
Main
(
string
[]
args
)
{
var
config
=
new
ConfigurationBuilder
()
.
AddCommandLine
(
args
)
.
AddEnvironmentVariables
(
"ASPNETCORE_"
)
.
Build
();
BuildWebHost
(
args
).
Run
();
}
var
host
=
new
WebHostBuilder
()
.
UseConfiguration
(
config
)
.
UseKestrel
()
.
UseContentRoot
(
Directory
.
GetCurrentDirectory
())
.
UseIISIntegration
()
public
static
IWebHost
BuildWebHost
(
string
[]
args
)
=>
WebHost
.
CreateDefaultBuilder
(
args
)
.
UseStartup
<
Startup
>()
.
Build
();
host
.
Run
();
}
}
}
samples/Sample.RabbitMQ.MySql/Startup.cs
View file @
6e33a1a7
...
...
@@ -20,14 +20,6 @@ namespace Sample.RabbitMQ.MySql
x
.
UseEntityFramework
<
AppDbContext
>();
x
.
UseRabbitMQ
(
"localhost"
);
x
.
UseDashboard
();
x
.
UseDiscovery
(
d
=>
{
d
.
DiscoveryServerHostName
=
"localhost"
;
d
.
DiscoveryServerPort
=
8500
;
d
.
CurrentNodeHostName
=
"localhost"
;
d
.
CurrentNodePort
=
5800
;
d
.
NodeName
=
"CAP 1号节点"
;
});
});
services
.
AddMvc
();
...
...
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