gpt4 book ai didi

java - 任务 ':compileGroovy'的执行失败。 org.springframework.security.authentication.encoding.PasswordEncoder

转载 作者:行者123 更新时间:2023-12-02 14:48:15 25 4
gpt4 key购买 nike

升级IDEA后启动项目时出现问题。
当前错误如下:

CONFIGURE SUCCESSFUL in 2s
|Running application...
> Task :compileJava NO-SOURCE
startup failed:
General error during semantic analysis: java.lang.NoClassDefFoundError: org.springframework.security.authentication.encoding.PasswordEncoder

java.lang.RuntimeException: java.lang.NoClassDefFoundError: org.springframework.security.authentication.encoding.PasswordEncoder
at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1118)
at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1098)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:645)


1 error


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileGroovy'.

> Task :compileGroovy FAILED
Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:207)



* Get more help at https://help.gradle.org

BUILD FAILED in 3s

如果我尝试清理并运行应用程序,则会得到以下信息:
|正在运行应用程序...
<-------------> 0%等待

IDLE startup failed: General error during semantic analysis: java.lang.NoClassDefFoundError: org.springframework.security.authentication.encoding.PasswordEncoder



失败:生成失败,发生异常。
  • 出了什么问题:
    任务':compileGroovy'的执行失败。

    Compilation failed; see the compiler error output for details.


  • 尝试了我所知道的一切,项目设置,清理缓存,使缓存无效并重新启动...没有任何帮助。

    最佳答案

    我找到了解决方案:
    grails.plugin.springsecurity.authentication.encoding.BCryptPasswordEncoder-使用不推荐使用的类

    class CryptoEncoderWrapper implements org.springframework.security.authentication.encoding.PasswordEncoder

    您需要将build.gradle更改为:
    compile 'org.grails.plugins:spring-security-core:4.0.0'

    BCrypt现在具有此导入
    import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
    现在,此问题已解决,但会导致其他问题。

    关于java - 任务 ':compileGroovy'的执行失败。 org.springframework.security.authentication.encoding.PasswordEncoder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62228861/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com