本地idea是能正常启动的,使用maven打包部署到服务器上之后,使用
nohup java -jar -Xms10g -Xmx10g -Dserver.port=$APP_PORT -Dnacos-addr=$NACOS_ADDR -Dnacos-namespace=$NACOS_NM -Dnacos-username=$NACOS_USERNAME -Dnacos-password=$NACOS_PASSWORD $APP_HOME/$APP_NAME >/dev/null 2>&1 &
启动时spring启动失败
日志如下
2022-03-02 10:04:35.380 ERROR [qz-fdmp-devops-server,,,] 6634 --- [main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in x.module.config.ResourceServerConfig required a bean of type 'org.springframework.security.oauth2.provider.token.TokenStore' that could not be found.
The following candidates were found but could not be injected:
- Bean method 'jdbcTokenStore' in 'TokenStoreConfig' not loaded because @ConditionalOnProperty (jeemis.security.oauth2.token.store.type=jdbc) did not find property 'type'
- Bean method 'tokenStore' in 'TokenStoreConfig' not loaded because @ConditionalOnProperty (jeemis.security.oauth2.token.store.type=redisCustom) did not find property 'type'
- Bean method 'tokenStoreCustom' in 'TokenStoreConfig' not loaded because @ConditionalOnProperty (jeemis.security.oauth2.token.store.type=redis) did not find property 'type'
- Bean method 'tokenStoreSpring' in 'TokenStoreConfig' not loaded because @ConditionalOnProperty (jeemis.security.oauth2.token.store.type=redisSpring) did not find property 'type'
- Bean method 'jwtTokenStore' in 'TokenStoreConfig.JwtTokenConfig' not loaded because @ConditionalOnProperty (jeemis.security.oauth2.token.store.type=jwt) did not find property 'type'
- Bean method 'tokenStore' in 'AuthorizationServerTokenServicesConfiguration.JwtKeyStoreConfiguration' not loaded because OAuth JWT KeyStore Condition did not find provided key store location
- Bean method 'jwtTokenStore' in 'AuthorizationServerTokenServicesConfiguration.JwtTokenServicesConfiguration' not loaded because OAuth JWT Condition did not find provided private or symmetric key
- Bean method 'jwkTokenStore' in 'ResourceServerTokenServicesConfiguration.JwkTokenStoreConfiguration' not loaded because OAuth JWK Condition did not find key jwk set URI not provided
- Bean method 'tokenStore' in 'ResourceServerTokenServicesConfiguration.JwtKeyStoreConfiguration' not loaded because OAuth JWT KeyStore Condition did not find key store location not provided
- Bean method 'jwtTokenStore' in 'ResourceServerTokenServicesConfiguration.JwtTokenServicesConfiguration' not loaded because OAuth JWT Condition did not find provided public key
其中x代指我司的框架
我实在是想不通为什么本地可以运行部署到服务区上就不行了,之前一直没出现过这种情况,直到我司改了一次nacos的密码,发现网站报错了,改完密码后再打包部署就这样了
我怀疑是maven出了问题,还没有更好的思路。
这个报错解释的很详细了.. 你有这么多org.springframework.security.oauth2.provider.token.TokenStore的bean但是都没注入 因为jeemis.security.oauth2.token.store.type=jwt 需要指定type 是不是没配置?
检查一下服务器上的配置文件里是不是少配了属性jeemis.security.oauth2.token.store.type
望采纳谢谢