mirror of https://github.com/abpframework/abp.git
committed by
GitHub
83 changed files with 1529 additions and 636 deletions
@ -0,0 +1,10 @@ |
|||||
|
{ |
||||
|
"culture": "zh-Hans", |
||||
|
"texts": { |
||||
|
"Permission:DocumentManagement": "文档管理", |
||||
|
"Permission:Projects": "项目", |
||||
|
"Permission:Edit": "编辑", |
||||
|
"Permission:Delete": "删除", |
||||
|
"Permission:Create": "创建" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
{ |
||||
|
"culture": "zh-Hans", |
||||
|
"texts": { |
||||
|
"Menu:DocumentManagement": "文档", |
||||
|
"Menu:ProjectManagement": "项目", |
||||
|
"CreateANewProject": "创建新项目", |
||||
|
"Edit": "编辑", |
||||
|
"Create": "创建", |
||||
|
"Projects": "项目", |
||||
|
"Name": "名称", |
||||
|
"ShortName": "简称", |
||||
|
"DocumentStoreType": "文件存储类型", |
||||
|
"Format": "格式", |
||||
|
"ShortNameInfoText": "将用于唯一的URL.", |
||||
|
"DisplayName:Name": "名称", |
||||
|
"DisplayName:ShortName": "简称", |
||||
|
"DisplayName:Format": "格式", |
||||
|
"DisplayName:DefaultDocumentName": "默认文档名称", |
||||
|
"DisplayName:NavigationDocumentName": "导航文档名称", |
||||
|
"DisplayName:MinimumVersion": "最低版本", |
||||
|
"DisplayName:MainWebsiteUrl": "主网站网址", |
||||
|
"DisplayName:LatestVersionBranchName": "最新版本的分支名称", |
||||
|
"DisplayName:GitHubRootUrl": "GitHub根网址", |
||||
|
"DisplayName:GitHubAccessToken": "GitHub访问令牌" |
||||
|
} |
||||
|
} |
||||
@ -1,12 +1,14 @@ |
|||||
{ |
{ |
||||
"culture": "zh-Hans", |
"culture": "zh-Hans", |
||||
"texts": { |
"texts": { |
||||
"Permission:IdentityManagement": "身份认证管理", |
"Volo.Abp.Identity:010001": "您无法删除自己的帐户!", |
||||
|
"Permission:IdentityManagement": "身份标识管理", |
||||
"Permission:RoleManagement": "角色管理", |
"Permission:RoleManagement": "角色管理", |
||||
"Permission:Create": "创建", |
"Permission:Create": "创建", |
||||
"Permission:Edit": "编辑", |
"Permission:Edit": "编辑", |
||||
"Permission:Delete": "删除", |
"Permission:Delete": "删除", |
||||
"Permission:ChangePermissions": "更改权限", |
"Permission:ChangePermissions": "更改权限", |
||||
"Permission:UserManagement": "用户管理" |
"Permission:UserManagement": "用户管理", |
||||
|
"Permission:UserLookup": "用户查询" |
||||
} |
} |
||||
} |
} |
||||
@ -1,6 +1,8 @@ |
|||||
{ |
{ |
||||
"culture": "zh-Hans", |
"culture": "zh-Hans", |
||||
"texts": { |
"texts": { |
||||
"Permissions": "权限" |
"Permissions": "权限", |
||||
|
"OnlyProviderPermissons": "只有这个提供商", |
||||
|
"All": "所有" |
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
using Volo.Abp.Localization; |
||||
|
|
||||
|
namespace Volo.Abp.SettingManagement.Localization |
||||
|
{ |
||||
|
[LocalizationResourceName("AbpSettingManagement")] |
||||
|
public class AbpSettingManagementResource |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"culture": "en", |
||||
|
"texts": { |
||||
|
"Settings": "Settings" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"culture": "tr", |
||||
|
"texts": { |
||||
|
"Settings": "Ayarlar" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"culture": "zh-Hans", |
||||
|
"texts": { |
||||
|
"Settings": "设置" |
||||
|
} |
||||
|
} |
||||
@ -1,33 +1,31 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: auth-server |
|
||||
name: auth-server |
name: auth-server |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: auth-server |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: auth-server |
app: auth-server |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: auth-server |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-auth-server" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:51511 |
value: Development |
||||
- name: ConnectionStrings__Default |
- name: ASPNETCORE_URLS |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
value: http://0.0.0.0:51511 |
||||
- name: RabbitMQ__Connections__Default__HostName |
- name: ConnectionStrings__Default |
||||
value: rabbitmq |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: Redis__Configuration |
- name: RabbitMQ__Connections__Default__HostName |
||||
value: redis |
value: rabbitmq |
||||
image: volosoft/microservice-demo-auth-server |
- name: Redis__Configuration |
||||
name: auth-server |
value: redis |
||||
ports: |
ports: |
||||
- containerPort: 51511 |
- name: http |
||||
resources: {} |
containerPort: 51511 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: auth-server |
|
||||
name: auth-server |
name: auth-server |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 51511 |
|
||||
targetPort: 51511 |
|
||||
selector: |
selector: |
||||
io.kompose.service: auth-server |
app: auth-server |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 51511 |
||||
|
targetPort: http |
||||
@ -1,33 +1,31 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: backend-admin-app |
|
||||
name: backend-admin-app |
name: backend-admin-app |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: backend-admin-app |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: backend-admin-app |
app: backend-admin-app |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: backend-admin-app |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-backend-admin-app" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: Redis__Configuration |
- name: AuthServer__Authority |
||||
value: redis |
value: http://auth-server:51511 |
||||
- name: RemoteServices__Default__BaseUrl |
- name: Redis__Configuration |
||||
value: http://backend-admin-app-gateway/ |
value: redis |
||||
image: volosoft/microservice-demo-backend-admin-app |
- name: RemoteServices__Default__BaseUrl |
||||
name: backend-admin-app |
value: http://backend-admin-app-gateway/ |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,45 +1,43 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: backend-admin-app-gateway |
|
||||
name: backend-admin-app-gateway |
name: backend-admin-app-gateway |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: backend-admin-app-gateway |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: backend-admin-app-gateway |
app: backend-admin-app-gateway |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: backend-admin-app-gateway |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-backend-admin-app-gateway" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: ConnectionStrings__Default |
- name: AuthServer__Authority |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
value: http://auth-server:51511 |
||||
- name: GlobalConfiguration__BaseUrl |
- name: ConnectionStrings__Default |
||||
value: http://backend-admin-app-gateway |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: ReRoutes__0__DownstreamHostAndPorts__0__Host |
- name: GlobalConfiguration__BaseUrl |
||||
value: identity-service |
value: http://backend-admin-app-gateway |
||||
- name: ReRoutes__0__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__0__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: identity-service |
||||
- name: ReRoutes__1__DownstreamHostAndPorts__0__Host |
- name: ReRoutes__0__DownstreamHostAndPorts__0__Port |
||||
value: product-service |
value: "80" |
||||
- name: ReRoutes__1__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__1__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: product-service |
||||
- name: Redis__Configuration |
- name: ReRoutes__1__DownstreamHostAndPorts__0__Port |
||||
value: redis |
value: "80" |
||||
- name: RemoteServices__Default__BaseUrl |
- name: Redis__Configuration |
||||
value: http://backend-admin-app-gateway/ |
value: redis |
||||
image: volosoft/microservice-demo-backend-admin-app-gateway |
- name: RemoteServices__Default__BaseUrl |
||||
name: backend-admin-app-gateway |
value: http://backend-admin-app-gateway/ |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: backend-admin-app-gateway |
|
||||
name: backend-admin-app-gateway |
name: backend-admin-app-gateway |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: backend-admin-app-gateway |
app: backend-admin-app-gateway |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: backend-admin-app |
|
||||
name: backend-admin-app |
name: backend-admin-app |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: backend-admin-app |
app: backend-admin-app |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,39 +1,37 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: blogging-service |
|
||||
name: blogging-service |
name: blogging-service |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: blogging-service |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: blogging-service |
app: blogging-service |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: blogging-service |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-blogging-service" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: ConnectionStrings__Blogging |
- name: AuthServer__Authority |
||||
value: mongodb://mongodb|MsDemo_Blogging |
value: http://auth-server:51511 |
||||
- name: ConnectionStrings__Default |
- name: ConnectionStrings__Blogging |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
value: mongodb://mongodb|MsDemo_Blogging |
||||
- name: RabbitMQ__Connections__Default__HostName |
- name: ConnectionStrings__Default |
||||
value: rabbitmq |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: Redis__Configuration |
- name: RabbitMQ__Connections__Default__HostName |
||||
value: redis |
value: rabbitmq |
||||
- name: RemoteServices__Default__BaseUrl |
- name: Redis__Configuration |
||||
value: http://internal-gateway/ |
value: redis |
||||
image: volosoft/microservice-demo-blogging-service |
- name: RemoteServices__Default__BaseUrl |
||||
name: blogging-service |
value: http://internal-gateway/ |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: blogging-service |
|
||||
name: blogging-service |
name: blogging-service |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: blogging-service |
app: blogging-service |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,35 +1,33 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: identity-service |
|
||||
name: identity-service |
name: identity-service |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: identity-service |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: identity-service |
app: identity-service |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: identity-service |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-identity-service" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: ConnectionStrings__Default |
- name: AuthServer__Authority |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
value: http://auth-server:51511 |
||||
- name: RabbitMQ__Connections__Default__HostName |
- name: ConnectionStrings__Default |
||||
value: rabbitmq |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: Redis__Configuration |
- name: RabbitMQ__Connections__Default__HostName |
||||
value: redis |
value: rabbitmq |
||||
image: volosoft/microservice-demo-identity-service |
- name: Redis__Configuration |
||||
name: identity-service |
value: redis |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: identity-service |
|
||||
name: identity-service |
name: identity-service |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: identity-service |
app: identity-service |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,47 +1,45 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: internal-gateway |
|
||||
name: internal-gateway |
name: internal-gateway |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: internal-gateway |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: internal-gateway |
app: internal-gateway |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: internal-gateway |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-internal-gateway" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: ConnectionStrings__Default |
- name: AuthServer__Authority |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
value: http://auth-server:51511 |
||||
- name: GlobalConfiguration__BaseUrl |
- name: ConnectionStrings__Default |
||||
value: http://internal-gateway |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: ReRoutes__0__DownstreamHostAndPorts__0__Host |
- name: GlobalConfiguration__BaseUrl |
||||
value: identity-service |
value: http://internal-gateway |
||||
- name: ReRoutes__0__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__0__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: identity-service |
||||
- name: ReRoutes__1__DownstreamHostAndPorts__0__Host |
- name: ReRoutes__0__DownstreamHostAndPorts__0__Port |
||||
value: product-service |
value: "80" |
||||
- name: ReRoutes__1__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__1__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: product-service |
||||
- name: ReRoutes__2__DownstreamHostAndPorts__0__Host |
- name: ReRoutes__1__DownstreamHostAndPorts__0__Port |
||||
value: blogging-service |
value: "80" |
||||
- name: ReRoutes__2__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__2__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: blogging-service |
||||
- name: Redis__Configuration |
- name: ReRoutes__2__DownstreamHostAndPorts__0__Port |
||||
value: redis |
value: "80" |
||||
image: volosoft/microservice-demo-internal-gateway |
- name: Redis__Configuration |
||||
name: internal-gateway |
value: redis |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: internal-gateway |
|
||||
name: internal-gateway |
name: internal-gateway |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: internal-gateway |
app: internal-gateway |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,22 +1,19 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: mongodb |
|
||||
name: mongodb |
name: mongodb |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: mongodb |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: mongodb |
app: mongodb |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- image: mongo |
- name: mongodb |
||||
name: mongodb |
image: "mongo" |
||||
ports: |
ports: |
||||
- containerPort: 27017 |
- containerPort: 27017 |
||||
resources: {} |
|
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,10 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: mongodb |
|
||||
name: mongodb |
name: mongodb |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
app: mongodb |
||||
ports: |
ports: |
||||
- port: 27017 |
- port: 27017 |
||||
targetPort: 27017 |
targetPort: 27017 |
||||
selector: |
|
||||
io.kompose.service: mongodb |
|
||||
status: |
|
||||
loadBalancer: {} |
|
||||
@ -1,38 +1,36 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: product-service |
|
||||
name: product-service |
name: product-service |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: product-service |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: product-service |
app: product-service |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: product-service |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-product-service" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: ConnectionStrings__Default |
- name: AuthServer__Authority |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated |
value: http://auth-server:51511 |
||||
Security=false |
- name: ConnectionStrings__Default |
||||
- name: ConnectionStrings__ProductManagement |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated |
||||
value: Server=sqlserver;Database=MsDemo_ProductManagement;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
Security=false |
||||
- name: RabbitMQ__Connections__Default__HostName |
- name: ConnectionStrings__ProductManagement |
||||
value: rabbitmq |
value: Server=sqlserver;Database=MsDemo_ProductManagement;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: Redis__Configuration |
- name: RabbitMQ__Connections__Default__HostName |
||||
value: redis |
value: rabbitmq |
||||
image: volosoft/microservice-demo-product-service |
- name: Redis__Configuration |
||||
name: product-service |
value: redis |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: product-service |
|
||||
name: product-service |
name: product-service |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: product-service |
app: product-service |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,33 +1,31 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: public-website |
|
||||
name: public-website |
name: public-website |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: public-website |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: public-website |
app: public-website |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: public-website |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-public-website" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: Redis__Configuration |
- name: AuthServer__Authority |
||||
value: redis |
value: http://auth-server:51511 |
||||
- name: RemoteServices__Default__BaseUrl |
- name: Redis__Configuration |
||||
value: http://public-website-gateway/ |
value: redis |
||||
image: volosoft/microservice-demo-public-website |
- name: RemoteServices__Default__BaseUrl |
||||
name: public-website |
value: http://public-website-gateway/ |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,43 +1,41 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: public-website-gateway |
|
||||
name: public-website-gateway |
name: public-website-gateway |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: public-website-gateway |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: public-website-gateway |
app: public-website-gateway |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: public-website-gateway |
||||
- name: ASPNETCORE_ENVIRONMENT |
image: "volosoft/microservice-demo-public-website-gateway" |
||||
value: Development |
env: |
||||
- name: ASPNETCORE_URLS |
- name: ASPNETCORE_ENVIRONMENT |
||||
value: http://0.0.0.0:80 |
value: Development |
||||
- name: AuthServer__Authority |
- name: ASPNETCORE_URLS |
||||
value: http://auth-server:51511 |
value: http://0.0.0.0:80 |
||||
- name: ConnectionStrings__Default |
- name: AuthServer__Authority |
||||
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
value: http://auth-server:51511 |
||||
- name: GlobalConfiguration__BaseUrl |
- name: ConnectionStrings__Default |
||||
value: http://public-website-gateway |
value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false |
||||
- name: ReRoutes__0__DownstreamHostAndPorts__0__Host |
- name: GlobalConfiguration__BaseUrl |
||||
value: product-service |
value: http://public-website-gateway |
||||
- name: ReRoutes__0__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__0__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: product-service |
||||
- name: ReRoutes__1__DownstreamHostAndPorts__0__Host |
- name: ReRoutes__0__DownstreamHostAndPorts__0__Port |
||||
value: blogging-service |
value: "80" |
||||
- name: ReRoutes__1__DownstreamHostAndPorts__0__Port |
- name: ReRoutes__1__DownstreamHostAndPorts__0__Host |
||||
value: "80" |
value: blogging-service |
||||
- name: Redis__Configuration |
- name: ReRoutes__1__DownstreamHostAndPorts__0__Port |
||||
value: redis |
value: "80" |
||||
image: volosoft/microservice-demo-public-website-gateway |
- name: Redis__Configuration |
||||
name: public-website-gateway |
value: redis |
||||
ports: |
ports: |
||||
- containerPort: 80 |
- name: http |
||||
resources: {} |
containerPort: 80 |
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: public-website-gateway |
|
||||
name: public-website-gateway |
name: public-website-gateway |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: public-website-gateway |
app: public-website-gateway |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: public-website |
|
||||
name: public-website |
name: public-website |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 80 |
|
||||
targetPort: 80 |
|
||||
selector: |
selector: |
||||
io.kompose.service: public-website |
app: public-website |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 80 |
||||
|
targetPort: http |
||||
@ -1,23 +1,20 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: rabbitmq |
|
||||
name: rabbitmq |
name: rabbitmq |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: rabbitmq |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: rabbitmq |
app: rabbitmq |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- image: rabbitmq:3-management-alpine |
- name: rabbitmq |
||||
name: rabbitmq |
image: "rabbitmq:3-management-alpine" |
||||
ports: |
ports: |
||||
- containerPort: 5672 |
- containerPort: 5672 |
||||
- containerPort: 15672 |
- containerPort: 15672 |
||||
resources: {} |
|
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,18 +1,14 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: rabbitmq |
|
||||
name: rabbitmq |
name: rabbitmq |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
app: rabbitmq |
||||
ports: |
ports: |
||||
- name: "5672" |
- name: "5672" |
||||
port: 5672 |
port: 5672 |
||||
targetPort: 5672 |
targetPort: 5672 |
||||
- name: "15672" |
- name: "15672" |
||||
port: 15672 |
port: 15672 |
||||
targetPort: 15672 |
targetPort: 15672 |
||||
selector: |
|
||||
io.kompose.service: rabbitmq |
|
||||
status: |
|
||||
loadBalancer: {} |
|
||||
@ -1,22 +1,19 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: redis |
|
||||
name: redis |
name: redis |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: redis |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: {} |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: redis |
app: redis |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- image: redis |
- name: redis |
||||
name: redis |
image: "redis" |
||||
ports: |
ports: |
||||
- containerPort: 6379 |
- containerPort: 6379 |
||||
resources: {} |
|
||||
restartPolicy: Always |
|
||||
status: {} |
|
||||
@ -1,14 +1,10 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: redis |
|
||||
name: redis |
name: redis |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 6379 |
|
||||
targetPort: 6379 |
|
||||
selector: |
selector: |
||||
io.kompose.service: redis |
app: redis |
||||
status: |
ports: |
||||
loadBalancer: {} |
- port: 6379 |
||||
|
targetPort: 6379 |
||||
@ -1,35 +1,35 @@ |
|||||
apiVersion: extensions/v1beta1 |
apiVersion: apps/v1 |
||||
kind: Deployment |
kind: Deployment |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: sqlserver |
|
||||
name: sqlserver |
name: sqlserver |
||||
spec: |
spec: |
||||
|
selector: |
||||
|
matchLabels: |
||||
|
app: sqlserver |
||||
replicas: 1 |
replicas: 1 |
||||
strategy: |
|
||||
type: Recreate |
|
||||
template: |
template: |
||||
metadata: |
metadata: |
||||
labels: |
labels: |
||||
io.kompose.service: sqlserver |
app: sqlserver |
||||
spec: |
spec: |
||||
containers: |
containers: |
||||
- env: |
- name: sqlserver |
||||
|
image: mcr.microsoft.com/mssql/server |
||||
|
ports: |
||||
|
- containerPort: 1433 |
||||
|
env: |
||||
|
- name: MSSQL_PID |
||||
|
value: "Developer" |
||||
- name: ACCEPT_EULA |
- name: ACCEPT_EULA |
||||
value: "Y" |
value: "Y" |
||||
- name: SA_PASSWORD |
- name: SA_PASSWORD |
||||
value: yourStrong(!)Password |
value: yourStrong(!)Password |
||||
image: mcr.microsoft.com/mssql/server |
- name: MSSQL_SA_PASSWORD |
||||
name: sqlserver |
value: yourStrong(!)Password |
||||
ports: |
|
||||
- containerPort: 1433 |
|
||||
resources: {} |
|
||||
volumeMounts: |
volumeMounts: |
||||
- mountPath: /var/opt/mssql |
- name: dbdata |
||||
name: dbdata |
mountPath: /var/opt/mssql |
||||
restartPolicy: Always |
|
||||
volumes: |
volumes: |
||||
- name: dbdata |
- name: dbdata |
||||
persistentVolumeClaim: |
persistentVolumeClaim: |
||||
claimName: dbdata |
claimName: dbdata |
||||
status: {} |
|
||||
@ -1,14 +1,11 @@ |
|||||
apiVersion: v1 |
|
||||
kind: Service |
kind: Service |
||||
|
apiVersion: v1 |
||||
metadata: |
metadata: |
||||
labels: |
|
||||
io.kompose.service: sqlserver |
|
||||
name: sqlserver |
name: sqlserver |
||||
spec: |
spec: |
||||
ports: |
|
||||
- port: 1433 |
|
||||
targetPort: 1433 |
|
||||
selector: |
selector: |
||||
io.kompose.service: sqlserver |
app: sqlserver |
||||
status: |
ports: |
||||
loadBalancer: {} |
- protocol: TCP |
||||
|
port: 1433 |
||||
|
targetPort: 1433 |
||||
@ -0,0 +1,53 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
using Volo.Abp.Users; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.Users |
||||
|
{ |
||||
|
/* This entity shares the same table/collection ("AbpUsers" by default) with the |
||||
|
* IdentityUser entity of the Identity module. |
||||
|
* |
||||
|
* - You can define your custom properties into this class. |
||||
|
* - You never create or delete this entity, becase it is Identity module's job. |
||||
|
* - You can query users from database with this entity. |
||||
|
* - You can update values of your custom properties. |
||||
|
*/ |
||||
|
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser |
||||
|
{ |
||||
|
#region Base properties
|
||||
|
|
||||
|
/* These properties are shared with the IdentityUser entity of the Identity module. |
||||
|
* Do not change these properties through this class. Instead, use Identity module |
||||
|
* services (like IdentityUserManager) to change them. |
||||
|
* So, this properties are designed as read only! |
||||
|
*/ |
||||
|
|
||||
|
public virtual Guid? TenantId { get; private set; } |
||||
|
|
||||
|
public virtual string UserName { get; private set; } |
||||
|
|
||||
|
public virtual string Name { get; private set; } |
||||
|
|
||||
|
public virtual string Surname { get; private set; } |
||||
|
|
||||
|
public virtual string Email { get; private set; } |
||||
|
|
||||
|
public virtual bool EmailConfirmed { get; private set; } |
||||
|
|
||||
|
public virtual string PhoneNumber { get; private set; } |
||||
|
|
||||
|
public virtual bool PhoneNumberConfirmed { get; private set; } |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
/* Add your own properties here. Example: |
||||
|
* |
||||
|
* public virtual string MyProperty { get; set; } |
||||
|
*/ |
||||
|
|
||||
|
private AppUser() |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,29 +0,0 @@ |
|||||
using System.IO; |
|
||||
using Microsoft.EntityFrameworkCore; |
|
||||
using Microsoft.EntityFrameworkCore.Design; |
|
||||
using Microsoft.Extensions.Configuration; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.EntityFrameworkCore |
|
||||
{ |
|
||||
public class MyProjectNameDbContextFactory : IDesignTimeDbContextFactory<MyProjectNameDbContext> |
|
||||
{ |
|
||||
public MyProjectNameDbContext CreateDbContext(string[] args) |
|
||||
{ |
|
||||
var configuration = BuildConfiguration(); |
|
||||
|
|
||||
var builder = new DbContextOptionsBuilder<MyProjectNameDbContext>() |
|
||||
.UseSqlServer(configuration.GetConnectionString("Default")); |
|
||||
|
|
||||
return new MyProjectNameDbContext(builder.Options); |
|
||||
} |
|
||||
|
|
||||
private static IConfigurationRoot BuildConfiguration() |
|
||||
{ |
|
||||
var builder = new ConfigurationBuilder() |
|
||||
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../MyCompanyName.MyProjectName.Web/")) |
|
||||
.AddJsonFile("appsettings.json", optional: false); |
|
||||
|
|
||||
return builder.Build(); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,26 +0,0 @@ |
|||||
using System.Threading.Tasks; |
|
||||
using Microsoft.Extensions.DependencyInjection; |
|
||||
using Shouldly; |
|
||||
using Volo.Abp.Identity; |
|
||||
using Xunit; |
|
||||
|
|
||||
namespace MyCompanyName.MyProjectName.Samples |
|
||||
{ |
|
||||
public class SampleTest : MyProjectNameApplicationTestBase |
|
||||
{ |
|
||||
private readonly IIdentityUserAppService _userAppService; |
|
||||
|
|
||||
public SampleTest() |
|
||||
{ |
|
||||
_userAppService = ServiceProvider.GetRequiredService<IIdentityUserAppService>(); |
|
||||
} |
|
||||
|
|
||||
[Fact] |
|
||||
public async Task Initial_Data_Should_Contain_Admin_User() |
|
||||
{ |
|
||||
var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()); |
|
||||
result.TotalCount.ShouldBeGreaterThan(0); |
|
||||
result.Items.ShouldContain(u => u.UserName == "admin"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,59 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using MyCompanyName.MyProjectName.Users; |
||||
|
using Shouldly; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
using Volo.Abp.Identity; |
||||
|
using Volo.Abp.Uow; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.Samples |
||||
|
{ |
||||
|
public class SampleTests : MyProjectNameApplicationTestBase |
||||
|
{ |
||||
|
private readonly IIdentityUserAppService _userAppService; |
||||
|
private readonly IRepository<AppUser, Guid> _appUserRepository; |
||||
|
private readonly IUnitOfWorkManager _unitOfWorkManager; |
||||
|
|
||||
|
public SampleTests() |
||||
|
{ |
||||
|
_userAppService = ServiceProvider.GetRequiredService<IIdentityUserAppService>(); |
||||
|
_appUserRepository = ServiceProvider.GetRequiredService<IRepository<AppUser, Guid>>(); |
||||
|
_unitOfWorkManager = ServiceProvider.GetRequiredService<IUnitOfWorkManager>(); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public async Task Initial_Data_Should_Contain_Admin_User() |
||||
|
{ |
||||
|
//Act
|
||||
|
var result = await _userAppService.GetListAsync(new GetIdentityUsersInput()); |
||||
|
|
||||
|
//Assert
|
||||
|
result.TotalCount.ShouldBeGreaterThan(0); |
||||
|
result.Items.ShouldContain(u => u.UserName == "admin"); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public async Task Should_Query_AppUser() |
||||
|
{ |
||||
|
/* Need to manually start Unit Of Work because |
||||
|
* FirstOrDefaultAsync should be executed while db connection / context is available. |
||||
|
*/ |
||||
|
using (var uow = _unitOfWorkManager.Begin()) |
||||
|
{ |
||||
|
//Act
|
||||
|
var adminUser = await _appUserRepository |
||||
|
.Where(u => u.UserName == "admin") |
||||
|
.FirstOrDefaultAsync(); |
||||
|
|
||||
|
//Assert
|
||||
|
adminUser.ShouldNotBeNull(); |
||||
|
|
||||
|
await uow.CompleteAsync(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,6 +1,7 @@ |
|||||
{ |
{ |
||||
"ConnectionStrings": { |
"ConnectionStrings": { |
||||
"Default": "Server=localhost;Database=IdentityServerHost;Trusted_Connection=True;MultipleActiveResultSets=true", |
"Default": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", |
||||
"SqlServerCache": "Server=localhost;Database=MyProjectNameCache;Trusted_Connection=True;MultipleActiveResultSets=true" |
|
||||
|
"SqlServerCache": "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true" |
||||
} |
} |
||||
} |
} |
||||
@ -1 +1 @@ |
|||||
dotnet sql-cache create "Server=localhost;Database=MyProjectNameCache;Trusted_Connection=True;MultipleActiveResultSets=true" dbo TestCache |
dotnet sql-cache create "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true" dbo TestCache |
||||
@ -1,6 +1,11 @@ |
|||||
{ |
{ |
||||
"ConnectionStrings": { |
"ConnectionStrings": { |
||||
"Default": "Server=localhost;Database=MyProjectNameHost;Trusted_Connection=True;MultipleActiveResultSets=true", |
"Default": "Server=localhost;Database=MyProjectName_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true", |
||||
"SqlServerCache": "Server=localhost;Database=MyProjectNameCache;Trusted_Connection=True;MultipleActiveResultSets=true" |
|
||||
|
"AbpSettingManagement": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", |
||||
|
"AbpPermissionManagement": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", |
||||
|
"AbpAuditLogging": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true", |
||||
|
|
||||
|
"SqlServerCache": "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true" |
||||
} |
} |
||||
} |
} |
||||
Loading…
Reference in new issue