core

《Spring源码深度解析》阅读笔记(一)

别来无恙 提交于 2019-12-11 04:58:12
第一章:spring整体架构和环境搭建 1)core container:核心容器 核心容器包含core,beans,context,expressoin language core:是spring框架基本的核心工具类,spring的其他组件基本上都要用到core里面的类 beans:包含访问配置文件,创建和管理bean,以及进行IoC/DI 操作相关类 context:构建在core和beans的基础之上,提供了一种类似于JNDI注册器的框架式的对象访问方法。Context继承了Beans的特性,为spring核心提供了大量扩展,添加了对国际化,事件传播,资源加载和对Context的透明创建的支持。ApplicationContext接口是Context模块的关键 expression language:表达式语言,用于在运行时查询和操纵对象 2)AOP 提供面向切面编程的实现 3)Data Access/Integration 包含了JDBC,ORM,JMS,Transaction等模块 4)web web上下文建立在应用程序上下文之上,为基于web的应用程序提供了上下文。例如web-servlet模块,该模块包含model-view-controller(MVC)实现。 来源: CSDN 作者: guihhhh 链接: https://blog.csdn.net/weixin

Asp.net Core 3.0 Identity 使用smtp账户确认和密码恢复

给你一囗甜甜゛ 提交于 2019-12-11 03:39:34
当新建一个core项目后,使用identity基架后,确认邮件出现了错误,并不能正常使用。 建立文档在这里 https://docs.microsoft.com/zh-cn/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-3.1&tabs=visual-studio#scaffold-identity-into-an-empty-project 参考后发现,并没有实现这个接口,需要自己完成,这是官方文档,可是官方第三方key https://docs.microsoft.com/zh-cn/aspnet/core/security/authentication/accconfirm?view=aspnetcore-3.1&tabs=visual-studio#require-email-confirmation 下面,使用一个自己的习惯吧,就是用自己的邮箱发送内容给用户。 和官方文档一样,建立一个EmailSender 兄弟 们接代码: public class EmailSender : IEmailSender { public async Task SendEmailAsync(string email, string subject, string message) { //

Which signal was delivered to process deadlocked in signal handler

无人久伴 提交于 2019-12-11 03:14:41
问题 I have a core dump from a process that deadlocked after invoking a signal handler. How do I determine which signal was delivered and who sent it? The GDB-generated backtrace for the the thread that received the signal follows. The signal handler was called in frame 15. (gdb) bt #0 0x00007fa9c204654b in sys_futex (w=0x7fa9c2263d80, value=2, loop=<value optimized out>) at ./src/base/linux_syscall_support.h:1789 #1 base::internal::SpinLockDelay (w=0x7fa9c2263d80, value=2, loop=<value optimized

FileNotFoundException when using System.IO.Directory.CreateDirectory()

落花浮王杯 提交于 2019-12-11 02:01:50
问题 I am facing a problem when running .net app on Azure. When using CreateDirectory method, it throws FileNotFoundException with the message of "Could not find file 'D:\home\site\wwwroot\CVs'.". The app worked without any exception when running locally and on a private server. Any idea what could be the problem? Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "CVs")); 回答1: Assuming, that you're running your app as an Azure Web App, you need to be careful what you try to

Scheduling multiple .net core console apps

ε祈祈猫儿з 提交于 2019-12-10 23:31:51
问题 I'm a newbie to .net core and have a question about how to schedule multiple .net core console apps in the Windows task scheduler. How I was able to schedule a test console app was to set the program/script to "dotnet", the args to "mytestnetcoreconsoleapp.dll", and the startup directory to that which contained the dll. Would this be correct to do for multiple console apps though? From what I understand about the task scheduler, having multiple tasks with the same program name is a no no. I

InvalidOperationException: No authentication handler is registered for the scheme 'CookieSettings'

杀马特。学长 韩版系。学妹 提交于 2019-12-10 22:19:41
问题 I am developing an application using ASP.Net MVC core 2.1 where i am continuously getting the following exception. "InvalidOperationException: No authentication handler is registered for the scheme 'CookieSettings'. The registered schemes are: Identity.Application, Identity.External, Identity.TwoFactorRememberMe, Identity.TwoFactorUserId. Did you forget to call AddAuthentication().AddSomeAuthHandler?" I went through articles did the necessary changes but exception remains the same. I am

解决solr 请求参数过长报错too many boolean clauses Exception

落爺英雄遲暮 提交于 2019-12-10 18:43:07
当使用slor查询时,有时候我们的查询条件会非常多,由于solr的booleanquery默认设置的条件数为1024,所以超过这个限制的 会报异常too many boolean clauses Exception,这样设置的原因是为了限制过多条件查询,降低查询的性能,但有时候又必须这样查,或分析数据用, 所以可以临时改变下,修改方法: 1、在solr的实例中有一个conf的文件solrconfig.xml文件中 在<query>的标签下有一个<maxBooleanClauses>1024</maxBooleanClauses>,单纯只修改这个1024,重启solr后并不会生效; 原因: maxBooleanClauses属性是全局的lucene配置,当存在多个实例core时,只修改其中一个,当solr在加载的时候,只会取最后一个加载的core设置的maxBooleanClauses值。所以如果你的solr里面存在多个core,那么必须给每一个core都配置maxBooleanClauses; 注:在solr最新版本中solrhome->solr.xml,全局设置中需要设置booleanClauses <int name="maxBooleanClauses">${solr.max.booleanClauses:1024}</int> 这样全局变量设置与单个core设置应该就可以了

 .NET Core 3.1发布,支持三年的LTS版本

老子叫甜甜 提交于 2019-12-10 16:55:36
​ .NET Core 3.1 发布了,这是对两个多月前发布的 .NET Core 3.0 的一小部分修复和完善,其中最重要的是 .NET Core 3.1 是一个长期支持(LTS)版本,并且官方将会支持三年。 .NET Core 3.1 中的更改主要集中在 Blazor 和 Windows Desktop,这是 .NET Core 3.0 中的两个新增特性,包括对 C++/CLI 的支持,这已经是开发 Windows 的常规需求。 Windows Forms Controls Removal 此版本移除了以下 Windows Forms 控件: DataGrid ToolBar ContextMenu Menu MainMenu MenuItem 早在 2005 年,这些控件就被 .NET Framework 2.0 中更强大的控件所取代,默认情况下 Visual Studio Designer 工具箱中都没有提供这些控件,现在官方决定删除这些控件,而只关注新控件。 建议替代方案如下: 微软认为随着进一步完善 Windows Forms 设计器项目,这些控件与创建现代应用不匹配,并且永远不应该成为 Windows Forms .NET Core 版本的一部分。这样重大的变化,目标是继续改进 Windows Forms,以实现更高的 DPI、可访问性和可靠性,并且利于后期更新的进行

Objective-C 和 Core Foundation 对象相互转换的内存管理总结

点点圈 提交于 2019-12-10 15:32:33
一、非ARC的内存管理 倘若不使用ARC,手动管理内存,思路比较清晰,使用完,release转换后的对象即可。 //NSString 转 CFStringRef CFStringRef aCFString = (CFStringRef) [[NSString alloc] initWithFormat:@ "%@" , string]; //... CFRelease(aCFString); //CFStringRef 转 NSString CFStringRef aCFString = CFStringCreateWithCString(kCFAllocatorDefault, bytes, NSUTF8StringEncoding); NSString *aNSString = (NSString *)aCFString; //... [aNSString release]; 二、ARC下的内存管理 ARC的诞生大大简化了我们针对内存管理的开发工作,但是只支持管理 Objective-C 对象, 不支持 Core Foundation 对象。Core Foundation 对象必须使用CFRetain和CFRelease来进行内存管理。那么当使用Objective-C 和 Core Foundation 对象相互转换的时候,必须让编译器知道,到底由谁来负责释放对象

Has anyone gotten swashbuckle to work with .net core 3 yet?

我的未来我决定 提交于 2019-12-10 15:28:22
问题 I'm trying to generate a swagger doc for my rest API. .net core 3. I've searched other questions on this here and can't seem to find any suggestions that work. The controller is VERY simple, no abstracts, generics, all methods have http attributes, etc. I've tried swashbuckle v4 packages and also the v5 rc2 packages. the v4 packages just cause a runtime exception in .net core on load. the v5 packages always generate a null reference exception in the .json file. The controller is coded and