小编Cha*_*les的帖子

返回值Mybatis

我正在尝试从Oracle 11g中的存储函数获取返回值(Integer值).

该函数将10添加到输入数字:

FUNCTION ADD_TEN(INPUT IN NUMBER) RETURN NUMBER IS 
BEGIN 
    RETURN INPUT + 10; 
END;
Run Code Online (Sandbox Code Playgroud)

在我的mapper界面中,我有一行:

Integer add(Integer input); 
Run Code Online (Sandbox Code Playgroud)

并在Xml文件中

<select id="add" statementType="CALLABLE" resultType='java.lang.Integer'>
    {#{output,mode=OUT,jdbcType=NUMERIC,javaType=Integer} = call test_pkg.ADD_TEN( 
    #{input,jdbcType=NUMERIC}) } 
</select>`
Run Code Online (Sandbox Code Playgroud)

对方法的调用如下:

Integer sum = mapper.add(45); 
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误:

Could not set property 'output' of 'class java.lang.Integer' with value '55' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'output' in 'class java.lang.Integer' 
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?我真的迷失了......

谢谢.

java oracle return mybatis

7
推荐指数
1
解决办法
2万
查看次数

使用APDU将CAP文件上传到智能卡

我正在尝试将applet(.cap文件)安装到智能卡中.我读过可以使用APDU完成.我使用Netbeans创建了我的applet,它的帮助是// aid/9AE9BE4D27/53.

首先构建apdu,选择installer applet:

0x00 0xA4 0x04 0x00 0X09 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;

然后构建apdu,它将创建我的applet(遵循此sctructure):

header: 0x80 0xb8 0x00 0x00

lc aid:

aid:

le: 0x7F;

我开发了一个应用程序,可以使用apdu命令发送到真实卡channel.transmit(new CommandAPDU(apdu).我想如果我发送正确的安装命令,我的.cap文件应该安装在卡中.

有了这些信息,任何人都可以帮我构建正确的apdu,将我的cap文件安装到真实的卡片中吗?

谢谢.

java eclipse netbeans smartcard javacard

2
推荐指数
1
解决办法
3531
查看次数

标签 统计

java ×2

eclipse ×1

javacard ×1

mybatis ×1

netbeans ×1

oracle ×1

return ×1

smartcard ×1