Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译发生时Attempted to serialize java.lang.Class: java.net.URI. Forgot to register a type adapter? #134

Closed
mozhimen opened this issue Dec 26, 2023 · 1 comment
Labels
invalid This doesn't seem right

Comments

@mozhimen
Copy link

  • 问题版本 1.2.1

  • 问题描述

Attempted to serialize java.lang.Class: java.net.URI. Forgot to register a type adapter?

image

  • 问题复现方式

注解@route(path="/third?type=mod")在

image

  • 注解异常处理打印RouteItem和正常RouteItem对比

image

image

  • gson序列化问题所在位置

微信图片_20231226222421

@kymjs
Copy link
Collaborator

kymjs commented Dec 27, 2023

路由的path定义时不能带参数,如需要向落地页传参,请使用运行时代码传参。如果需要声明默认参数,可在注解的params字段传递。
https://therouter.cn/docs/2022/08/28/01

@kymjs kymjs closed this as completed Dec 27, 2023
@kymjs kymjs added the invalid This doesn't seem right label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants