mayi-auth/src/main/java/com/zf1976/mayi/auth/config/ResourceServerSecurityConfiguration.java
@Bean
    @DependsOn(value = "securityProperties")
    @ConditionalOnMissingBean
    public KeyPair keyPair() {
        if (this.keyPair == null) {
            synchronized (this) {
                if (this.keyPair == null) {
                    ClassPathResource classPathResource = new ClassPathResource("root.jks");
                    KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(classPathResource, properties.getRsaSecret().toCharArray());
                    this.keyPair = keyStoreKeyFactory.getKeyPair("root", properties.getRsaSecret().toCharArray());
                }
            }
        }
        return this.keyPair;
    }
/**
     * authentication server key pair
     *
     * @return {@link KeyPair}
     */
authentication server key pair
@return  KeyPair
authentication server key pair @return KeyPair
@Bean
    @DependsOn(value = "securityProperties")
    @ConditionalOnMissingBean
    public KeyPair keyPair() {
        if (this.keyPair == null) {
            synchronized (this) {
                if (this.keyPair == null) {
                    ClassPathResource classPathResource = new ClassPathResource("root.jks");
                    KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(classPathResource, properties.getRsaSecret().toCharArray());
                    this.keyPair = keyStoreKeyFactory.getKeyPair("root", properties.getRsaSecret().toCharArray());
                }
            }
        }
        return this.keyPair;
    }
@ Bean @ DependsOn ( value = "securityProperties" ) @ ConditionalOnMissingBean public KeyPair keyPair ( ) { if ( this . keyPair == null ) { synchronized ( this ) { if ( this . keyPair == null ) { ClassPathResource classPathResource = new ClassPathResource ( "root.jks" ) ; KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory ( classPathResource , properties . getRsaSecret ( ) . toCharArray ( ) ) ; this . keyPair = keyStoreKeyFactory . getKeyPair ( "root" , properties . getRsaSecret ( ) . toCharArray ( ) ) ; } } } return this . keyPair ; }
authentication server key pair
 @return {@link KeyPair}
authentication server key pair @return { @link KeyPair }