当前位置: 首页 > 知识库问答 >
问题:

我无法用Spring Boot 2.2.8和Undertow加载keyystore. p12或. jks。

习旻
2023-03-14

我有一个属性文件:

server:
  port: 8443
  http2:
    enabled: true
  ssl:
    enabled: true
    key-store: classpath:keystore.p12
    key-store-password: admin00
    key-store-type: PKCS12
    key-alias: tomcat

当我启动应用程序显示此错误:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-06-28 10:21:55.068 ERROR 8380 --- [           main] o.s.b.SpringApplication                  : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.server.WebServerException: Could not load key store 'classpath:keystore.p12'

我将p12复制到另一个文件夹(/mnt/d/KeyStores/):

我使用以下方法进行测试:密钥库:/mnt/d/密钥库/密钥库.p12

密钥库: D:\密钥库\密钥库.p12

密钥存储:文件:/mnt/d/KeyStores/keystory.p12

密钥存储:文件:D:\KeyStores\keystore. p12

密钥库:file:///D:/KeyStores/keystore.p12

key-store:file:///D://KeyStores//keystore . p12

密钥存储:file:///D:\密钥库\keystore.p12

结果相同。我使用的是底拖:

package com.oesia.mako.config

import io.undertow.UndertowOptions
import org.springframework.boot.web.embedded.undertow.UndertowBuilderCustomizer
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class UndertowConfig {

    @Bean
    fun embeddedServletContainerFactory(): UndertowServletWebServerFactory {
        val factory = UndertowServletWebServerFactory()
        factory.addBuilderCustomizers(UndertowBuilderCustomizer { builder ->
            builder.setServerOption(UndertowOptions.ENABLE_HTTP2, true)
                    .setServerOption(UndertowOptions.HTTP2_SETTINGS_ENABLE_PUSH,true)
        })
        return factory
    }

}

我的毕业档案是:

buildscript {
    ext {
        kotlinVersion = '1.3.72'
        springBootVersion = '2.2.8.RELEASE'
        springDocVersion = '1.3.9'
        groovyVersion = '2.5.12'
        groovySpockVersion = '1.2-groovy-2.5'
        validationApiVersion = '2.0.1.Final'
        liquibaseCoreVersion = '3.6.3'
        liquibaseVersion = '2.0.1'
        myBatisVersion = '3.4.5'
        injectVersion = '1'
        gitPropertiesVersion = '1.4.21'
        plantUMLVersion = '0.1.+'
        keycloakVersion = '4.0.0.Final'
        keycloakUndertowVersion = '6.0.0'
        postgreSQLVersion = '42.2.5'
        alpnBootVersion = '8.1.13.v20181017'
        sl4jVersion = '1.7.25'
        testLoggerVersion = '1.6.0'
        gradleTestsetsVersion = '3.0.1'
    }
    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://repo.spring.io/milestone" }
        maven { url "https://plugins.gradle.org/m2/" }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
        classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
        classpath("be.jlr-home.gradle:plantumlPlugin:${plantUMLVersion}")
        classpath("com.adarshr.test-logger:com.adarshr.test-logger.gradle.plugin:${testLoggerVersion}")
        classpath("org.liquibase:liquibase-core:${liquibaseCoreVersion}")
        classpath("org.liquibase:liquibase-gradle-plugin:${liquibaseVersion}")
// Descomentar si se tiene git
//      classpath("gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:${gitPropertiesVersion}")
    }
}

apply plugin: 'maven-publish'
apply plugin: 'groovy'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'jacoco'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'plantuml'
apply plugin: 'com.adarshr.test-logger'
apply plugin: 'liquibase'

group = 'com.oesia.mako'
rootProject.archivesBaseName = 'mako'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/milestone" }
}

sourceSets {
    main {
        kotlin {
            srcDir 'src/main/kotlin'
            srcDir 'src/main/customized/kotlin'
            srcDir 'src/main/generated/kotlin'
        }
    }
    test {
        groovy {
            srcDir 'src/test/groovy'
        }
    }
}

configurations {
    all {
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
        exclude group: 'ch.qos.logback', module: 'logback-classic'
    }
}

dependencies {
    implementation("javax.inject:javax.inject:${injectVersion}")
    implementation("org.springdoc:springdoc-openapi-ui:${springDocVersion}")
    implementation("org.springdoc:springdoc-openapi-data-rest:${springDocVersion}")
    implementation("org.springdoc:springdoc-openapi-kotlin:${springDocVersion}")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
    implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
    implementation("javax.validation:validation-api:${validationApiVersion}")
    implementation("com.oesia.cleanarchitecture:commons-domain:+")
    implementation("com.oesia.cleanarchitecture:commons-infrastructure:+")
    implementation("com.oesia.mako:mako-rrhh-domain:+")
    implementation("com.oesia.mako:mako-rrhh-usecases:+")
    implementation("com.oesia.mako:mako-rrhh-adapter:+")
    implementation("com.oesia.mako:mako-rrhh-config:+")
    implementation("org.springframework.boot:spring-boot-starter-security")
    implementation("org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:${springBootVersion}")
    implementation("org.springframework.boot:spring-boot-starter-hateoas")
    implementation("org.springframework.boot:spring-boot-starter-actuator")
    implementation("org.springframework.boot:spring-boot-starter-jdbc")
    implementation("org.springframework.boot:spring-boot-starter-web")
    implementation("org.springframework.boot:spring-boot-starter-undertow")
    implementation("org.springframework.boot:spring-boot-starter-log4j2:${springBootVersion}")
    implementation("org.postgresql:postgresql:${postgreSQLVersion}")
    testRuntimeOnly("net.bytebuddy:byte-buddy:1.9.1")          // allows mocking of classes (in addition to interfaces)
    testRuntimeOnly("org.objenesis:objenesis:2.6")    // allows mocking of classes without default constructor (together with CGLIB)
    // Liquibase
    liquibaseRuntime("org.liquibase:liquibase-core:${liquibaseCoreVersion}")
    liquibaseRuntime("org.liquibase:liquibase-groovy-dsl:${liquibaseVersion}")
    liquibaseRuntime("ch.qos.logback:logback-core:1.2.3")
    liquibaseRuntime("ch.qos.logback:logback-classic:1.2.3")
    testImplementation("org.springframework.boot:spring-boot-starter-test")
    //implementation("org.keycloak:keycloak-spring-boot-2-starter:${keycloakVersion}")
    //implementation("org.keycloak:keycloak-undertow-adapter:${keycloakUndertowVersion}")
    testImplementation("org.codehaus.groovy:groovy-all:${groovyVersion}")
    testImplementation("org.spockframework:spock-core:${groovySpockVersion}")
    testImplementation("org.spockframework:spock-spring:${groovySpockVersion}")
    // optional dependencies for using Spock
    testImplementation("org.hamcrest:hamcrest-core:1.3") // only necessary if Hamcrest matchers are used
}

testlogger {
    // pick a theme - mocha, standard, plain, mocha-parallel, standard-parallel or plain-parallel
    theme 'mocha'
    // set to false to disable detailed failure logs
    showExceptions true
    // set threshold in milliseconds to highlight slow tests
    slowThreshold 2000
    // displays a breakdown of passes, failures and skips along with total duration
    showSummary true
    // set to false to hide passed tests
    showPassed true
    // set to false to hide skipped tests
    showSkipped true
    // set to false to hide failed tests
    showFailed true
    // enable to see standard out and error streams inline with the test results
    showStandardStreams false
    // set to false to hide passed standard out and error streams
    showPassedStandardStreams true
    // set to false to hide skipped standard out and error streams
    showSkippedStandardStreams true
    // set to false to hide failed standard out and error streams
    showFailedStandardStreams true
}

def changeLog = "./schema/ddl/database-changelog-master.yml"

task liquibaseDev {
    println "executing dev liquibase"
    liquibase {
        activities {
            main {
                changeLogFile changeLog
                url 'jdbc:postgresql://localhost:5432/mako'
                username 'mako'
                password 'mako'
            }
        }
    }    
}
task liquibaseInt {
    println "executing int liquibase"
    liquibase {
        activities {
            main {
                changeLogFile changeLog
                url 'jdbc:postgresql://localhost:5432/mako'
                username 'mako'
                password 'mako'
            }
        }
    }    
}
task liquibasePre {
    println "executing pre liquibase"
    liquibase {
        activities {
            main {
                changeLogFile changeLog
                url 'jdbc:postgresql://localhost:5432/mako'
                username 'mako'
                password 'mako'
            }
        }
    }    
}
task liquibasePro {
    println "executing pro liquibase"
    liquibase {
        activities {
            main {
                changeLogFile changeLog
                url 'jdbc:postgresql://localhost:5432/mako'
                username 'mako'
                password 'mako'
            }
        }
    }    
}

jacoco {
    toolVersion = "0.8.3"
    reportsDir = file("$buildDir/customJacocoReportDir")
}

jacocoTestReport {
    reports {
        xml.enabled false
        csv.enabled false
        html.destination file("${buildDir}/jacocoHtml")
    }
}

bootRun {
    if ( project.hasProperty('jvmArgs') ) {
        jvmArgs = (project.jvmArgs.split("\\s+") as List)
    }
}

plantuml {
    sourcePath = 'src/main/kotlin' +
            'src/main/customized/kotlin' +
            'src/main/generated/kotlin'
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
    }
}

我该如何配置带有Spring启动 2.2.8 和 Undertow 的 https?我认为这在旧版本的Spring靴中运行。使用http运行正常时,只能与https一起崩溃,因为不要加载p12文件。

我把p12换成jks等效值,也有同样的误差:

server:
  port: 8443
  http2:
    enabled: true
  ssl:
    key-store: classpath:keystore.jks    
    key-store-password: admin00
    key-store-type: JKS
    key-alias: tomcat

输出:

2020-06-29 10:21:55.915  WARN 12772 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.server.WebServerException: Could not 
load key store 'classpath:keystore.jks'
2020-06-29 10:21:55.981  INFO 12772 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-06-29 10:21:56.042 ERROR 12772 --- [           main] o.s.b.SpringApplication                  : Application run failed      

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.server.WebServerException: Could not load key store 'classpath:keystore.jks'
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[springc 
ontext-5.2.7.RELEASE.jar:5.2.7.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at com.oesia.mako.MakoApplicationKt.main(MakoApplication.kt:10) [main/:?]
Caused by: java.lang.IllegalStateException: org.springframework.boot.web.server.WebServerException: Could not load key store 'classpath:keystore.jks'
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.getKeyManagers(SslBuilderCustomizer.java:125) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.customize(SslBuilderCustomizer.java:75) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.customizeSsl(UndertowServletWebServerFactory.java:252) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.createBuilder(UndertowServletWebServerFactory.java:239) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.getWebServer(UndertowServletWebServerFactory.java:220) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        ... 8 more
Caused by: org.springframework.boot.web.server.WebServerException: Could not load key store 'classpath:keystore.jks'
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.loadStore(SslBuilderCustomizer.java:188) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.loadKeyStore(SslBuilderCustomizer.java:169) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.getKeyStore(SslBuilderCustomizer.java:143) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.getKeyManagers(SslBuilderCustomizer.java:110) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.customize(SslBuilderCustomizer.java:75) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.customizeSsl(UndertowServletWebServerFactory.java:252) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.createBuilder(UndertowServletWebServerFactory.java:239) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.getWebServer(UndertowServletWebServerFactory.java:220) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        ... 8 more
Caused by: java.io.IOException: Invalid keystore format
        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:663) ~[?:1.8.0_211]
        at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56) ~[?:1.8.0_211]
        at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224) ~[?:1.8.0_211]
        at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70) ~[?:1.8.0_211]
        at java.security.KeyStore.load(KeyStore.java:1445) ~[?:1.8.0_211]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.loadStore(SslBuilderCustomizer.java:184) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.loadKeyStore(SslBuilderCustomizer.java:169) ~[spi 
ng-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.getKeyStore(SslBuilderCustomizer.java:143) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.getKeyManagers(SslBuilderCustomizer.java:110) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.SslBuilderCustomizer.customize(SslBuilderCustomizer.java:75) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.customizeSsl(UndertowServletWebServerFactory.java:252) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.createBuilder(UndertowServletWebServerFactory.java:239) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.getWebServer(UndertowServletWebServerFactory.java:220) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:180) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
        ... 8 more


> Task :bootRun FAILED

共有2个答案

郎恺
2023-03-14

胡西包括这种依赖关系。它用于加载证书并启用 SSL

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
祖波光
2023-03-14

jks腐败了。我测试jks的方法是:

keytool.exe -list -v -keystore keystore.jks 

我可以看到它被破坏了。

然后我用以下命令重新生成jks:

keytool.exe -genkeypair -alias tomcat -keyalg RSA -keysize 2048 -keystore keystore.jks -validity 9650 -storepass admin00

我的财产是:

server:
  port: 8443
  http2:
    enabled: true
  ssl:
    enabled: true
    key-store: classpath:keystore.jks
    key-store-password: admin00
    key-store-type: JKS
    trust-store-type: JKS
    key-alias: tomcat

应用程序运行正常:

 __  __  _____  __ ___ _____     _____  _____  ___     _____  _____  _____  ____ 
/  \/  \/  _  \|  |  //  _  \   /  _  \/  _  \/___\   /  _  \/   __\/  ___>/    \
|  \/  ||  _  ||  _ < |  |  |   |  _  ||   __/|   |   |  _  <|   __||___  |\-  -/
\__ \__/\__|__/|__|__\\_____/   \__|__/\__/   \___/   \__|\_/\_____/<_____/ |__|
2020-07-08 17:54:14.735  INFO 4212 --- [           main] c.o.m.MakoApplicationKt                  : Starting MakoApplicationKt on DESKTOP-1MRHH61 with PID 4212 (D:\Workspaces\CleanArchitecture2\Mako\mako-rrhh-app\build\classes\kotlin\main started by jagilberte in D:\Workspaces\CleanArchitecture2\Mako\mako-rrhh-app)
2020-07-08 17:54:14.751  INFO 4212 --- [           main] c.o.m.MakoApplicationKt                  : The following profiles are active: dev
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/jagilberte/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.30/e606eac955f55ecf1d8edcccba04eb8ac98088dd/slf4j-simple-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/jagilberte/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j-impl/2.12.1/14973e22497adaf0196d481fb99c5dc2a0b58d41/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]   
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
2020-07-08 17:54:17.288  WARN 4212 --- [           main] i.u.w.jsr                                : UT026010: Buffer pool was 
not set on WebSocketDeploymentInfo, the default pool will be used
2020-07-08 17:54:17.322  INFO 4212 --- [           main] i.u.servlet                              : Initializing Spring embedded WebApplicationContext
2020-07-08 17:54:17.323  INFO 4212 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2482 ms
2020-07-08 17:54:18.606  INFO 4212 --- [           main] o.s.a.f.CglibAopProxy                    : Unable to proxy interface-implementing method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is marked as final: Consider using interface-based JDK proxies instead!
2020-07-08 17:54:18.836  INFO 4212 --- [           main] o.s.s.c.ThreadPoolTaskExecutor           : Initializing ExecutorService 'applicationTaskExecutor'
2020-07-08 17:54:20.428  INFO 4212 --- [           main] o.s.s.w.DefaultSecurityFilterChain       : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@707f4647, org.springframework.security.web.context.SecurityContextPersistenceFilter@6644bdf5, org.springframework.security.web.header.HeaderWriterFilter@f44d033, org.springframework.security.web.authentication.logout.LogoutFilter@2c15034f, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@5ad40184, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@7c9ea1d0, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@7497a554, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@4b8a0d03, org.springframework.security.web.session.SessionManagementFilter@25e95af1, org.springframework.security.web.access.ExceptionTranslationFilter@4a58e0e9, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2f75a9b1]
2020-07-08 17:54:20.528  INFO 4212 --- [           main] o.s.b.a.e.w.EndpointLinksResolver        : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-07-08 17:54:20.644  INFO 4212 --- [           main] i.undertow                               : starting server: Undertow 
- 2.0.30.Final
2020-07-08 17:54:20.653  INFO 4212 --- [           main] o.xnio                                   : XNIO version 3.3.8.Final  
2020-07-08 17:54:20.667  INFO 4212 --- [           main] o.x.nio                                  : XNIO NIO Implementation Version 3.3.8.Final
2020-07-08 17:54:20.782  INFO 4212 --- [           main] o.s.b.w.e.u.UndertowServletWebServer     : Undertow started on port(s) 8443 (https) with context path '/mako'
2020-07-08 17:54:20.788  INFO 4212 --- [           main] c.o.m.MakoApplicationKt                  : Started MakoApplicationKt 
in 6.811 seconds (JVM running for 9.946)
<==========---> 83% EXECUTING [3m 38s]
 类似资料:
  • 我有一个控制器方法,它接受一个POJO。 如果我将它作为常规依赖项添加到控制器中,它将被加载(这并不奇怪),但仍然没有被使用。我是不是漏掉了一步?

  • 我已经安装了菲奥娜,Shauley,GDAL,RTER和PYPRJ的WHL文件。Geopandas也通过pip安装。但在导入时,我会遇到以下错误: 以及以下错误: 有人能帮我吗?我不知道如何解决这个问题。谢谢和问候。

  • 我有一个问题。 我尝试使用库运行我的java程序。 当我使用 它起作用了<但是当我试图传递类路径时,它无法找到或加载主类 错误: 原因:java。lang.ClassNotFoundException:myProgram

  • 在使用spring security和Thymeleaf时,我无法加载我的css文件。 每当我使用rel=“stylesheet”时,它都会给我带来严格的MIME启用错误。 我的Spring安全代码:

  • 问题内容: 我正在尝试使用Gradle运行一个非常简单的项目,并在使用时遇到以下错误: 这是我的文件结构: 我排除了libs和tmp文件夹的内容,因为我认为这与该问题无关,但是我可以在需要时添加它。 这是我的build.gradle文件: 关于如何解决此问题的任何想法?我已经为mainClassName属性尝试了各种方法,但似乎没有任何效果。 问题答案: 我在这里看到两个问题,一个与另一个有关。

  • 我的java应用程序编译有问题。 编译器说: