perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code sample:Cannot resolve method 'afterAfter' in 'FilterExample'

landou1107 opened this issue · comments

Code sample:
Error
afterAfter("/hello", (request, response) -> response.header("finally", "executed even if exception is throw"));
afterAfter((request, response) -> response.header("finally", "executed after any route even if exception is throw"));

Right
after("/hello", (request, response) -> response.header("finally", "executed even if exception is throw"));
after((request, response) -> response.header("finally", "executed after any route even if exception is throw"));

I tried, it works. You just need to import the method.