第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

用于在映射 Informatica PowerCenter 中寫入缺失值的 Java 代碼

用于在映射 Informatica PowerCenter 中寫入缺失值的 Java 代碼

慕勒3428872 2023-02-16 16:13:05
我想測(cè)試一個(gè)簡(jiǎn)單關(guān)閉應(yīng)用程序的類:@Componentpublic class ShutdownManager {    @Autowired    private ApplicationContext applicationcontext;    public int shutdown(int returnCode) {        return SpringApplication.exit(applicationcontext, () -> returnCode);    }}我創(chuàng)建的測(cè)試用例是這樣的:public class ShutdownManagerTest {    @Test    public void should_shutdown_gracefully() {        SpringApplication app = new SpringApplication(TestClass.class);        ConfigurableApplicationContext context = app.run();        ShutdownManager shutdownManager = (ShutdownManager)context.getBean("shutdownManager");        int result = shutdownManager.shutdown(10);        assertThat(result).isEqualTo(10);    }    @SpringBootApplication    @ImportResource("classpath:/core/shutdownmanagertest.xml")    private static class TestClass {        public TestClass() {        }        public static void main(String[] args) {        }    }}我的 shutdownmanagertest.xml 只包含一個(gè) bean:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">    <bean id="shutdownManager" class="com.mycodebase.ShutdownManager" /></beans>但是,當(dāng)我運(yùn)行它時(shí),它會(huì)抱怨:Field myOtherService in com.mycodebase.MyTask required a bean of type 'com.mycodebase.MyOtherService ' that could not be found.MyTask 類位于 ShutdownManager 的同一個(gè)包中,其中包含一個(gè)字段 myOtherService,該字段具有 @Autowire 注釋。但它沒(méi)有在我的測(cè)試 xml 中定義,它只包含一個(gè) bean。有人可以幫助我理解為什么它會(huì)嘗試解析不在上下文中的 bean 嗎?爪哇春天彈簧靴
查看完整描述

3 回答

?
千萬(wàn)里不及你

TA貢獻(xiàn)1784條經(jīng)驗(yàn) 獲得超9個(gè)贊

您應(yīng)該在聯(lián)接器轉(zhuǎn)換中加入兩個(gè)表。使用 Left(master) outer join 然后將其帶入目標(biāo)。然后將右表中的 BETRG 列映射到目標(biāo)以及左表中的其余列。發(fā)生的情況是,當(dāng)沒(méi)有匹配項(xiàng)時(shí),BETRG 將為空。將其放入表達(dá)式中,查看該值是否為 null 或空,然后將其更改為 0 或您想要的值。



查看完整回答
反對(duì) 回復(fù) 2023-02-16
?
MMMHUHU

TA貢獻(xiàn)1834條經(jīng)驗(yàn) 獲得超8個(gè)贊

我想測(cè)試一個(gè)簡(jiǎn)單關(guān)閉應(yīng)用程序的類:


@Component

public class ShutdownManager {

    @Autowired

    private ApplicationContext applicationcontext;


    public int shutdown(int returnCode) {

        return SpringApplication.exit(applicationcontext, () -> returnCode);

    }

}

我創(chuàng)建的測(cè)試用例是這樣的:


public class ShutdownManagerTest {

    @Test

    public void should_shutdown_gracefully() {

        SpringApplication app = new SpringApplication(TestClass.class);

        ConfigurableApplicationContext context = app.run();


        ShutdownManager shutdownManager = (ShutdownManager)context.getBean("shutdownManager");


        int result = shutdownManager.shutdown(10);


        assertThat(result).isEqualTo(10);

    }


    @SpringBootApplication

    @ImportResource("classpath:/core/shutdownmanagertest.xml")

    private static class TestClass {

        public TestClass() {

        }


        public static void main(String[] args) {

        }

    }

}

我的 shutdownmanagertest.xml 只包含一個(gè) bean:


<?xml version="1.0" encoding="UTF-8"?>


<beans xmlns="http://www.springframework.org/schema/beans"

       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">


    <bean id="shutdownManager" class="com.mycodebase.ShutdownManager" />


</beans>

但是,當(dāng)我運(yùn)行它時(shí),它會(huì)抱怨:


Field myOtherService in com.mycodebase.MyTask required a bean of type 'com.mycodebase.MyOtherService ' that could not be found.

MyTask 類位于 ShutdownManager 的同一個(gè)包中,其中包含一個(gè)字段 myOtherService,該字段具有 @Autowire 注釋。但它沒(méi)有在我的測(cè)試 xml 中定義,它只包含一個(gè) bean。


有人可以幫助我理解為什么它會(huì)嘗試解析不在上下文中的 bean 嗎?


爪哇春天彈簧靴


查看完整回答
反對(duì) 回復(fù) 2023-02-16
?
長(zhǎng)風(fēng)秋雁

TA貢獻(xiàn)1757條經(jīng)驗(yàn) 獲得超7個(gè)贊

這是有效的:


import java.util.*;


private ArrayList<String> myList2 = new ArrayList<String>();


QUALF_out = QUALF;

BETRG_out = BETRG;

SegmentNumber_out = SegmentNumber;

DOCNUM = DOCNUM;


array_for_search = QUALF + ParentSegmentNumber + DOCNUM ;

myList2.add(array_for_search);


System.out.println("myList: " + myList2);

System.out.println("Array: " + myList2.contains("910" + ParentSegmentNumber + DOCNUM));


if(!myList2.contains("910" + ParentSegmentNumber + DOCNUM)){

        QUALF_out="910";

        BETRG_out="0";

}

    generateRow(); 


查看完整回答
反對(duì) 回復(fù) 2023-02-16
  • 3 回答
  • 0 關(guān)注
  • 134 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)