#c#
#c#
Вопрос:
Когда мой ABP использует abpbackgroundjobsquartzмодуль, возникло исключение
Моя ошибка:
Quartz.SchedulerException: JobStore type 'Quartz.Simpl.RAMJobStore' props could not be configured. ---gt; Quartz.SchedulerConfigException: Could not parse property 'useProperties' into correct data type: No writable property 'useProperties' found ---gt; System.MemberAccessException: No writable property 'useProperties' found at Quartz.Util.ObjectUtils.SetPropertyValue(Object target, String propertyName, Object value) at Quartz.Util.ObjectUtils.SetObjectProperties(Object obj, NameValueCollection props) --- End of inner exception stack trace --- at Quartz.Util.ObjectUtils.SetObjectProperties(Object obj, NameValueCollection props) at Quartz.Impl.StdSchedulerFactory.Instantiate() [See nested exception: System.MemberAccessException: No writable property 'useProperties' found at Quartz.Util.ObjectUtils.SetPropertyValue(Object target, String propertyName, Object value) at Quartz.Util.ObjectUtils.SetObjectProperties(Object obj, NameValueCollection props)]
Мой код:
public override void PreConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); context.Services.PreConfigurelt;AbpMvcDataAnnotationsLocalizationOptionsgt;(options =gt; { PreConfigurelt;AbpJsonOptionsgt;(options =gt; { options.UseHybridSerializer = false; }); PreConfigurelt;IMvcBuildergt;(mvcBuilder =gt; { //https://github.com/abpframework/abp/pull/9299 mvcBuilder.AddControllersAsServices(); mvcBuilder.AddViewComponentsAsServices(); }); PreConfigurelt;AbpQuartzOptionsgt;(options =gt; { options.Configurator = configure =gt; { configure.UsePersistentStore(storeOptions =gt; { var x = configuration.GetConnectionString("Quartz"); storeOptions.UseProperties = true;//问题出在这里 //storeOptions.UseJsonSerializer(); storeOptions.UseSqlServer(configuration.GetConnectionString("Default")); //storeOptions.UseClustering(c =gt; //{ // c.CheckinMisfireThreshold = TimeSpan.FromSeconds(20); // c.CheckinInterval = TimeSpan.FromSeconds(10); //}); }); }; }); options.AddAssemblyResource( typeof(MyAppResource), typeof(MyAppDomainModule).Assembly, typeof(MyAppDomainSharedModule).Assembly, typeof(MyAppApplicationModule).Assembly, typeof(MyAppApplicationContractsModule).Assembly, typeof(MyAppWebModule).Assembly ); }); }
Когда я использую storeOptions.UseProperties = true
.