mirror of https://github.com/usbharu/Hideout.git
fix: classloaderの呼び出しを変更
This commit is contained in:
parent
6de06a9bde
commit
46c075bf6d
|
@ -67,7 +67,7 @@ fun Application.user(userService: UserService, activityPubUserService: ActivityP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get("/{name}/icon.png"){
|
get("/{name}/icon.png"){
|
||||||
call.respondBytes(Application::class.java.classLoader.getResourceAsStream("/icon.png").readAllBytes(),ContentType.Image.PNG)
|
call.respondBytes(javaClass.classLoader.getResourceAsStream("icon.png").readAllBytes(),ContentType.Image.PNG)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package dev.usbharu.hideout.routing
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test
|
||||||
|
|
||||||
|
class UserRoutingKtTest {
|
||||||
|
@Test
|
||||||
|
fun userIconTest() {
|
||||||
|
println(String.Companion::class.java.classLoader)
|
||||||
|
println(String::class.java.classLoader)
|
||||||
|
println(String.javaClass.classLoader.getResourceAsStream("icon.png")?.readAllBytes())
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue