小编Jak*_*ski的帖子

什么是jvm字节码中的stackmap表?

我正在学习ASM库来生成字节码.在某些时候我犯了一些错误的局部变量类型,并得到一个错误:

Exception in thread "main" java.lang.VerifyError: Bad local variable type
Exception Details:
  Location:
    Loops.start()V @56: aload_1
  Reason:
    Type top (current frame, locals[1]) is not assignable to reference type


  Stackmap Table:
    full_frame(@24,{Object[#2],Object[#9]},{Integer})
    full_frame(@25,{Object[#2],Object[#9]},{Integer,Integer})
    same_locals_1_stack_item_frame(@44,Integer)
    full_frame(@45,{Object[#2],Object[#9]},{Integer,Integer})
    full_frame(@48,{Object[#2]},{Integer})
    full_frame(@80,{Object[#2],Integer},{Integer})
    full_frame(@81,{Object[#2],Integer},{Integer,Integer})
    full_frame(@87,{Object[#2]},{Integer})
    full_frame(@119,{Object[#2],Integer},{Integer})
    full_frame(@120,{Object[#2],Integer},{Integer,Integer})
    same_locals_1_stack_item_frame(@123,Integer)
Run Code Online (Sandbox Code Playgroud)

问题并不难找到并修复,但我很好奇这个堆栈图表是什么东西?

java bytecode

8
推荐指数
1
解决办法
1751
查看次数

前端应用程序和另一个后端服务使用的 REST API 的身份验证方法

我有一个rest api后端服务A,它被另外两个服务使用:

  • B服务,是在浏览器中运行的 Web 应用程序(单独的节点服务器)
  • C服务也是后端服务(也是单独的服务器)

我最初的方法是使用基本身份验证进行 AB 通信,但这对于 AC 来说没有意义,因为无法在浏览器中安全地保存凭据。另一方面,引入会话和令牌对于 AB 通信来说似乎很奇怪。

无论我做什么,都像是一场拔河比赛。

您认为这种设置的合理解决方案是什么?

javascript java rest microservices

5
推荐指数
1
解决办法
4699
查看次数

Akka 2.4.6-问(或?)方法在哪里?

我目前正在与Akka和Scala学习Play。

Akka文档说,您可以使用?ask方法从演员那里获得消息。但是,我使用的Akka版本(2.4.6)中没有ActorRef类?ask在该类中。

它被移到某个地方还是被弃用了?

scala akka playframework

4
推荐指数
1
解决办法
356
查看次数

标签 统计

java ×2

akka ×1

bytecode ×1

javascript ×1

microservices ×1

playframework ×1

rest ×1

scala ×1