在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/ Linux問(wèn)答
過(guò)客 回答

使用了return語(yǔ)句,執(zhí)行第一遍循環(huán),當(dāng)然就退出此函數(shù)運(yùn)行環(huán)境了啊
所以,你拿到每一條數(shù)據(jù)到底要干啥呢

如果想對(duì)每一條數(shù)據(jù)操作,直接forEach或者利用回調(diào)函數(shù)啊

se.forEach(item => {
    // do something
})
安于心 回答

你提供信息太少了,代碼都不貼。
可能是https的證書(shū)驗(yàn)證問(wèn)題。

查看用戶名和郵箱

查看
git config --global -l
設(shè)置
git config --global user.email "thesame-email-as-github-account@mail.com";
git config --global user.name "your-username"

墨小白 回答

經(jīng)過(guò)自己查詢很多文章了解到,flume所支持elasticsearch版本較為落后,如果要想使用flume直接向es傳輸,需要使用低版本的es,而且需要修改jar包中的一些方法。flume的更新速度也遠(yuǎn)不如es的更新速率,所以應(yīng)該選取其它的日志收集策略

瘋子范 回答

兩者區(qū)別還挺大的,我一直使用的是6.x,看你自己會(huì)那個(gè)?

使勁操 回答

你這個(gè)是超時(shí)了,先ping一下服務(wù)器,確保能ping通,然后再看看服務(wù)器防火墻是不是沒(méi)有開(kāi)放端口,定位出問(wèn)題的點(diǎn)

柒槿年 回答

docker需要管理員權(quán)限讀寫(xiě)一部分系統(tǒng)文件

傲寒 回答

剛開(kāi)始建議使用一個(gè)帶桌面的,比如gnome方式

兔寶寶 回答

你的Dockerfile中有這樣的命令嗎:
設(shè)置工作目錄為/app,然后將當(dāng)前目錄中的文件傳到鏡像當(dāng)中的/app目錄下

WORKDIR /app
COPY ./ /app

然后容器啟動(dòng)之時(shí)執(zhí)行命令

CMD java -jar tracker-server.jar

也就是說(shuō)不存在什么掛載問(wèn)題,直接把所需的三個(gè)文件直接拷貝到鏡像當(dāng)中即可。

希望能幫助到你。

清夢(mèng) 回答

問(wèn)題 1:

用戶B 會(huì) push 出錯(cuò),原因是 repo 的提交已經(jīng)領(lǐng)先 B 本地的倉(cāng)庫(kù)。解決方法如你的問(wèn)題 2,B 需要先 pull,合并后再 push

問(wèn)題 2:

repo 最后是 B 合并后的結(jié)果


其實(shí),這種問(wèn)題,自己動(dòng)手操作一下會(huì)了解的更清晰

墨小羽 回答

webpack只是打包依賴的資源,你后端代碼可以單獨(dú)的放上去部署

喵小咪 回答

找到答案了,是由于linux自帶的是python2.6,它不允許 {k: size[k] for k in ('width', 'height')}這樣的寫(xiě)法。安裝python3就可以了

奧特蛋 回答

ERROR in xxx.js from UglifyJs,先試試這個(gè).我也遇到過(guò)這個(gè)問(wèn)題,但這個(gè)解決方案對(duì)我無(wú)效,我是有段代碼格式化的問(wèn)題,導(dǎo)致無(wú)法找到模塊名稱.

我不懂 回答

第一種方法

試過(guò)在module1-service中添加自定義datasource(只支持properties,Yml可能能實(shí)現(xiàn),但還不太會(huì)寫(xiě)),可以實(shí)現(xiàn)(此種方式不清楚是否會(huì)影響原來(lái)spring datasource機(jī)制,對(duì)spring原理不熟)
代碼如下:

@Component
@ConfigurationProperties(prefix = "spring.datasource")
@PropertySource("classpath:service-jdbc.properties")
public class MyDataSourceProperties {
    private String url;
    ...
}
@EnableConfigurationProperties(MyDataSourceProperties.class)
public class MyDataSourceConfig {
    @Autowired
    private MyDataSourceProperties myDataSourceProperties;
    @Bean
    @Primary
    public DataSource dataSource() {
        return DataSourceBuilder.create(myDataSourceProperties.getClassLoader()).type(myDataSourceProperties.getType()).driverClassName(myDataSourceProperties.determineDriverClassName()).url(myDataSourceProperties.determineUrl()).username(myDataSourceProperties.determineUsername()).password(myDataSourceProperties.determinePassword()).build();
    }
}

完整代碼:https://gitee.com/soft_xiang/...

第二種方法

在module1-service中自定義properties bean(此種方法較好,推薦),代碼如下

@Configuration
public class ServiceConfig {
    @Bean
    public static PropertySourcesPlaceholderConfigurer properties() {
        PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
        YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
        yaml.setResources(new ClassPathResource("application-module1-service.yml"));
        configurer.setProperties(yaml.getObject());
        return configurer;
    }
}

由第二種用法引起的新的問(wèn)題:

項(xiàng)目中如果存在多環(huán)境配置文件,如application-module1-service-dev.yml/application-module1-service-test.yml/application-module1-service/-release.yml時(shí),怎樣根據(jù)module1-web中配置的spring.profiles.active加載對(duì)應(yīng)的配置文件?
思路為在加載文件時(shí)使用SpringContextUtil獲取配置文件中的active,在properties()中根據(jù)active加載文件
代碼如下:

SpringContextUtil.java

@Order(Integer.MIN_VALUE)
@Component
public class SpringContextUtil implements ApplicationContextAware {

    private static ApplicationContext context = null;
    @Override
    public void setApplicationContext(ApplicationContext applicationContext)
            throws BeansException {
        this.context = applicationContext;
    }
    /// 獲取當(dāng)前環(huán)境
    public static String getActiveProfile() {
        return context.getEnvironment().getActiveProfiles()[0];
    }
    /// 獲取當(dāng)前環(huán)境
    public static String[] getActiveProfiles() {
        return context.getEnvironment().getActiveProfiles();
    }
}

ServiceConfig

    @Bean
    public static PropertySourcesPlaceholderConfigurer properties() {
        PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
        String path = "application-module1-service.yml";
        try {
            String profile = SpringContextUtil.getActiveProfile();
            if (StringUtils.isNotBlank(profile)) {
                path = "application-module1-service-" + profile + ".yml";
            }
        }catch (NullPointerException e){
            e.printStackTrace();
            System.out.println("SpringContextUtil...未加載...");
        }
        YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
        yaml.setResources(new ClassPathResource(path));//File引入
        configurer.setProperties(yaml.getObject());
        return configurer;
    }

完整代碼:https://gitee.com/soft_xiang/...

然而這里會(huì)有循環(huán)依賴問(wèn)題
運(yùn)行代碼會(huì)有

SpringContextUtil...未加載...

沒(méi)有實(shí)現(xiàn)根據(jù)active加載對(duì)應(yīng)配置文件

舊螢火 回答

主從關(guān)系如果建立正確,在主庫(kù)新建表,是會(huì)同步到從庫(kù)的。我建立的主從庫(kù)是這樣的。

風(fēng)畔 回答

那用戶信息是如何獲取的呢?

請(qǐng)求后端獲取的。

念初 回答

http通信,想和誰(shuí)通信就和誰(shuí)通信

安若晴 回答

試試這個(gè):

location ^~/(abc|bdc|utf)/(*.html) {

   rewrite ^(.*) https://test.example.com/$1  permanent;

}