1、工程A取不到本身的配置信息????

2、显示结果为null
package com.imooc.config;
import java.net.MalformedURLException;
import java.net.URL;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.googlecode.jsonrpc4j.spring.AutoJsonRpcClientProxyCreator;
import com.imooc.api.ProductRpc;
@Configuration
@ComponentScan(basePackageClasses={ProductRpc.class})
@EnableConfigurationProperties(RpcProperties.class)
public class RpcConfig {
@Resource
privat

本文探讨了SpringBoot工程中遇到的配置信息获取难题,包括工程A无法获取自身配置信息的问题,以及配置类显示结果为null的状况。通过对RpcProperties.java的分析,揭示可能的原因和解决方案。
最低0.47元/天 解锁文章
1193

被折叠的 条评论
为什么被折叠?



