I copy the code example from introduction of akka-http 
I manage the project by maven, and the pom.xml is 


and some plugins for scala and twirl are ignored.
The code is as follows

import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.Directives._
import akka.stream.ActorMaterializer

import scala.io.StdIn

object Main{
  def main(args : Array[String]): Unit ={
    implicit val system = ActorSystem("my-system")
    implicit val materializer = ActorMaterializer()
    // needed for the future flatMap/onComplete in the end
    implicit val ec = system.dispatcher
    val RESOURCE_DIR = "spark/deploy/master/webui"
    val STATIC_RESOURCE_DIR = "spark/deploy/static"
    val route =
      } ~
      path("hello") {
        get {
          pathPrefix("static") {
          } ~
    val bindingFuture = Http().bindAndHandle(route, "localhost", 8080)

    println(s"Server online at http://localhost:8080";)
    StdIn.readLine() // let it run until user presses return

But, some error hints appear in my intellj idea

Type mismatch, expected: ToResponseMarshallable, actual: HttpEntity.Strict


However, I can run this webservice without any error.

I also try to cast HttpEntity to ToResponseMarshallable, but the conversion 
is forbidden

What shall I do to clear the error hint in intellj idea?

Thanks in advance.

>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to