Skip to content

Commit 01cdca2

Browse files
author
v-anzha
committed
fix starup => load swagger file
1 parent 29b6031 commit 01cdca2

8 files changed

Lines changed: 34 additions & 69 deletions

File tree

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1 @@
1-
//如果要获取主机信息,记得把 hostspecific 设置成true
2-
3-
//导入命名空间组件
4-
5-
//引入我们的公共模板文件
6-
7-
//引入命名空间
8-
9-
10-
11-
//定义我们的输出文件夹
12-
13-
14-
15-
//--------------------------------------------------------------------
16-
// 此代码由T4模板自动生成
17-
// 生成时间 2018-10-09 13:33:54
18-
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
19-
//--------------------------------------------------------------------
20-
//连接数据库,打开 connect 连接
21-
//遍历全部数据库表
22-
23-
24-
//开始启动block块,参数是实体类文件名
25-
26-
27-
//开始启动block块,参数是实体类文件名
28-
29-
30-
//开始启动block块,参数是实体类文件名
31-
32-
33-
//开始启动block块,参数是实体类文件名
34-
35-
36-
//开始启动block块,参数是实体类文件名
37-
38-
39-
//开始启动block块,参数是实体类文件名
40-
41-
42-
//开始启动block块,参数是实体类文件名
43-
44-
45-
//开始启动block块,参数是实体类文件名
46-
47-
48-
//开始启动block块,参数是实体类文件名
49-
50-
51-
//开始启动block块,参数是实体类文件名
52-
53-
54-
//开始启动block块,参数是实体类文件名
55-
56-
57-
//开始启动block块,参数是实体类文件名
58-
59-
60-
//开始启动block块,参数是实体类文件名
61-
62-
63-
//开始启动block块,参数是实体类文件名
64-
65-
66-
//开始启动block块,参数是实体类文件名
67-
68-
1+
ErrorGeneratingOutput
Binary file not shown.

Blog.Core/Startup.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
110110
c.IncludeXmlComments(xmlPath, true);//默认的第二个参数是false,这个是controller的注释,记得修改
111111

112112
var xmlModelPath = Path.Combine(basePath, "Blog.Core.Model.xml");//这个就是Model层的xml文件名
113-
c.IncludeXmlComments(xmlPath, true);//默认的第二个参数是false,这个是controller的注释,记得修改
114113
c.IncludeXmlComments(xmlModelPath);
115114

116115
#region Token绑定到ConfigureServices
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.

Blog.Core/wwwroot/index.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>默认首页</title>
6+
<script src="http://o.eueueu.com/Scripts/jquery-1.8.3.min.js"></script>
7+
<script>
8+
var reqdatajson = {
9+
name:"dd",
10+
}
11+
$.ajax({
12+
url: "http://localhost:58428/api/Values",
13+
type: "POST",
14+
contentType: "application/json; charset=utf-8",
15+
data: '{ "UserID": 1, "name": "test" }',
16+
dataType: 'json',
17+
success: function (data) {
18+
alert(JSON.stringify(data));
19+
}
20+
21+
});
22+
23+
</script>
24+
</head>
25+
<body>
26+
<button id="btn">点击我请求数据</button>
27+
<div id="requestMsg"></div>
28+
<form id="sub1" method="post" action="http://localhost:58428/api/Values">
29+
<input name="name" type="text" />
30+
<input type="submit" value="提交吧" />
31+
</form>
32+
</body>
33+
</html>

0 commit comments

Comments
 (0)