can't find favicon.ico issue in play scala

后端 未结 2 1352
再見小時候
再見小時候 2021-01-25 14:23

I have tested a play 2.3.4 app, and in the console it complains the following:

! @6jg7imio5 - Internal server error, for (GET) [/favicon.ico] ->

play.api.App         


        
相关标签:
2条回答
  • 2021-01-25 14:46

    Every browser looks for favicon.ico when visiting the address. Just add that file to your public folder and add a route:

    GET  /favicon.ico   controllers.Assets.at(path="/public", file="favicon.ico")
    

    TIP: it can be also png file - in default new PlayJava or PlayScala project it can be found in public/images/favicon.png

    0 讨论(0)
  • 2021-01-25 14:51

    you should denote the path as controllers.Assets.at(path="/public/images", file="favicon.ico")

    0 讨论(0)
提交回复
热议问题