MicroService.Core | simple micro service core , base Owin

 by   mrhuo C# Version: Current License: No License

kandi X-RAY | MicroService.Core Summary

kandi X-RAY | MicroService.Core Summary

MicroService.Core is a C# library. MicroService.Core has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

MicroService.Core 的初衷是为了方便的创建一个微服务, 可作为 Windows Service 或者控制台模式启动。 它底层使用了 Nancy,使得开发过程很简单,很舒服! 注意:最新版本不再有 OWIN 了. 或在 Nuget 包管理器中搜索 MicroService.Core 安装。. 添加引用:using MicroService.Core; Main 方法中写如下代码:. 如生成的 EXE 文件为 MicroService.Samples.exe. 运行结果如果出现下面这个情况: 是因为权限不够,无法安装windows服务,以管理员权限运行命令行窗口再次执行以上命令, 截图如下: 查看 Windows 服务 列表,可以看到此服务已经正常运行:. 此微服务框架默认提供了服务状态地址 /health,如图,默认绑定地址是 可以得到如下的输出: 可以看出服务的一些情况,运行时常,暴露端点等等... 仅仅3行代码,抛去 using 引用,就只有2行代码,就可以做一个可以运行在命令行 /windows 服务的对外提供 API 能力的程序。. 关于 Nancy 模块的编写,请自行前往链接 学习,作为技术人员,学习是必不可少的技能。当然,你看到这里,先不用着急去学习 Nancy, 继续往下看,很简单的!. 在项目中新建一个名为 AddModule 的 Nancy 模块,代码如下:. 到这里可能你有点想法了,那我不能用 VS 调试吗? 答案是:可以!. 在 VS 项目上右键,进入项目属性页面,在调试选项卡下的启动参数里输入 --console,然后启动项目 如图:. 代码很简单,只有一个只读属性,获取了 Redis 服务的状态(模拟)。 下面,我们把他加入到上面的 /health 端点中,让我们的服务更加直观的展示出整体服务的状态。. 加了两个事件,服务启动之前执行事件和服务状态更新事件,在服务启动之前执行事件代码中, 使用 Nancy 内置的 TinyIoCContainer IoC容器注册了一个 RedisService 的实例。 在服务状态更新事件中,通过 service.GetComponent() 获取到了这个 RedisService 实例,在 serviceStatus 添加进去。.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              MicroService.Core has a low active ecosystem.
              It has 12 star(s) with 3 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              MicroService.Core has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of MicroService.Core is current.

            kandi-Quality Quality

              MicroService.Core has no bugs reported.

            kandi-Security Security

              MicroService.Core has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              MicroService.Core does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              MicroService.Core releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MicroService.Core
            Get all kandi verified functions for this library.

            MicroService.Core Key Features

            No Key Features are available at this moment for MicroService.Core.

            MicroService.Core Examples and Code Snippets

            No Code Snippets are available at this moment for MicroService.Core.

            Community Discussions

            QUESTION

            Autowire not working with org.springframework.boot.autoconfigure.jms.artemis.ArtemisProperties
            Asked 2019-Sep-03 at 13:26

            I'm trying to autowire the org.springframework.boot.autoconfigure.jms.artemis.ArtemisProperties in a library that is used in a SpringBoot application and I've got an error that the bean type cannot be found. During build time I have no issues.

            The library were I would like to retrieve some values from the ArtemisProperties class. The pom.xml from this library imports the artemis libraries.

            ...

            ANSWER

            Answered 2019-Sep-03 at 11:53
            First create a bean of ArtemisProperties and set properties in it and then you can autowired it. 
            @Bean 
            public ArtemisProperties artemisProperties () { 
            ArtemisProperties artemisObj = new ArtemisProperties(); 
            return artemisObj; 
            } 
            
            @Autowired private ArtemisProperties artemis;
            ------------------------------------------------------------------------
            

            Source https://stackoverflow.com/questions/57770512

            QUESTION

            dotnet restore on Jenkins Windows slave - Value cannot be null
            Asked 2018-Jun-27 at 17:35

            I have a .Net Core app which I am trying to get building on our new Jenkins server and am running into issues with restoring NuGet packages.

            Our new build infrastructure consists of a Jenkins master running on CentOS, and this particular build is being run on a Windows Server 2012 slave. The connection between the two is through SSH via Cygwin.

            This build works just fine on our old Jenkins, which has no build slaves, and runs on Windows Server 2012.

            We are using a Jenkinsfile to call NAnt build targets to run the build. Here is the restore target from the NAnt build file:

            ...

            ANSWER

            Answered 2018-Jun-27 at 17:35

            I added -v diag to the dotnet call. While the output was VERY verbose, it didn't give much more information about the error (i.e. which variable was null), but I did get a stack trace, and some additional Googling led me to this:

            .NET Core dotnet restore failing on jenkins with System.ArgumentNullException

            I added the LOCALAPPDATA variable to the slave env variable configuration in the Jenkins UI, and that fixed it.

            It appears that dotnet, and more specifically the nuget cli, relies on several Windows built-in environment variables for building paths, but I cannot find a list of these documented anywhere. Here is the current full list of custom variables that we have defined on our Jenkins slave:

            • APPDATA
            • LOCALAPPDATA
            • TEMP
            • USERPROFILE

            This typically is not an issue, of course, since these should always exist on a Windows system, but when building on a Jenkins slave, it creates its own custom build environment, and you must explicitly define these required built-in variables yourself.

            Source https://stackoverflow.com/questions/51052943

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install MicroService.Core

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/mrhuo/MicroService.Core.git

          • CLI

            gh repo clone mrhuo/MicroService.Core

          • sshUrl

            git@github.com:mrhuo/MicroService.Core.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link