草庐IT

declaration-specifiers

全部标签

Spring 启动 : How to specify the PasswordEncoder?

目前我得到了主课:packagecom.recweb.springboot;importorg.springframework.boot.SpringApplication;importorg.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplication/*@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})*/publicclassSpringbootApplication{publicstaticvo

mysql错误:The user specified as a definer ('mysql.infoschema' @'localhost' ) does not exist' when trying to dump tablespaces

在我将MySQL5.7升级到MySQL8.0后,我再次启动MySQL并出现错误:尝试转储表空间时,指定为定义器的用户('mysql.infoschema'@'localhost')不存在'。我不明白为什么会出现这个问题。我想知道如何解决它 最佳答案 当我不小心将MySQL版本从8降级到5.7时,我遇到了同样的错误。在第一次启动时,旧版本破坏了某些东西,因此版本8显示了上述错误。就我而言,我必须进入首先运行MySQL的docker容器dockerexec-itmysqlbash然后我基本上按照步骤heremysql-uroot-pmy

mysql - Laravel 迁移错误 : Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

使用phpartisanmake:auth在Laravel5.4上出现迁移错误[Illuminate\Database\QueryException]SQLSTATE[42000]:Syntaxerrororaccessviolation:1071Specifiedkeywastoolong;maxkeylengthis767bytes(SQL:altertableusersadduniqueusers_email_unique(email))[PDOException]SQLSTATE[42000]:Syntaxerrororaccessviolation:1071Specified

dart - 好或坏 : Declaring main method async in Dart/Flutter

我在整个app中声明了一个全局变量——SharedPreferencesprefs,并在main方法中初始化。但是,SharedPreferences初始化返回一个Future-因此我尝试等待它在应用程序的main关闭中得到解决:SharedPreferencesprefs;voidmain()async{prefs=awaitSharedPreferences.getInstance();runApp(MyApp());}而且效果很好。我目前在生产中的2个应用程序中使用此方法,我突然想到使main方法异步可能是不正确的。最后我有两个问题:main方法是如何被调用的,以及它在Dart/

android - Kotlin Realm : Class must declare a public constructor with no arguments if it contains custom constructors

我正在Kotlin中创建一个Realm对象。Realm对象:openclassPurposeModel(var_id:Long?,varpurposeEn:String?,varpurposeAr:String?):RealmObject()当我编译上面的代码时,我得到了这个错误:error:Class"PurposeModel"mustdeclareapublicconstructorwithnoargumentsifitcontainscustomconstructors.我在Kotlin中找不到任何与此相关的问题。我该如何解决这个问题? 最佳答案

android - java.lang.IllegalArgumentException : Parameter specified as non-null is null for Kotlin and WebView

我正在尝试使用自定义HTML字符串填充我的WebView,并尝试在未加载时显示进度,并在完成时隐藏它。这是我的代码:webView.settings.javaScriptEnabled=truewebView.loadDataWithBaseURL(null,presentation.content,"text/html","utf-8",null)webView.webViewClient=object:WebViewClient(){overridefunonPageStarted(view:WebView,url:String,favicon:Bitmap){super.onPa

java - "Accidental override: The following declarations have the same JVM signature"实现Java接口(interface)时

我在尝试扩展RuntimeException并实现GraphQLError时遇到了以下错误接口(interface),用Java定义,来self的Kotlin代码。这是错误:Accidentaloverride:ThefollowingdeclarationshavethesameJVMsignature(getMessage()Ljava.lang.string;):publicopenfun():String?definedinNegativeCountExceptionpublicopenfungetMessage():String?definedinNegativeCountE

android - java.lang.IllegalArgumentException : Parameter specified as non-null is null: method kotlin. jvm.internal.Intrinsics.checkParameterIsNotNull

我收到了这个错误java.lang.IllegalArgumentException:指定为非空的参数为空:方法kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull,参数事件换行覆盖funonEditorAction(v:TextView,actionId:Int,event:KeyEvent)以下是整个代码。此代码最初是在java中,我使用AndroidStudio将其转换为Kotlin,但现在我收到此错误。我尝试重建和清理项目,但没有奏效。valaction=supportActionBar//gettheactionbara

android - IllegalArgumentException : Parameter specified as non-null is null

我收到以下运行时错误:checkParameterIsNotNull,parameteroneClickTokensatcom.info.app.fragments.Fragment_Payment_Profile$fetchMerchantHashes$1.onPostExecute(Fragment_Payment_Profile.kt:0)atcom.info.app.fragments.Fragment_Payment_Profile$fetchMerchantHashes$1.onPostExecute(Fragment_Payment_Profile.kt:1543)这是我

kotlin - 意外覆盖 : The following declarations have the same JVM signature

我在这部分的Kotlin中遇到了错误:classGitHubRepoAdapter(privatevalcontext:Context,privatevalvalues:List):ArrayAdapter(context,R.layout.list_item,values)私有(private)val上下文:上下文日志中写着:Error:(14,25)Accidentaloverride:ThefollowingdeclarationshavethesameJVMsignature(getContext()Landroid/content/Context;):fun():Contex