I'm working with this tutorial which uses lambda expressions.

[Spring Boot - Bookmarks](http://spring.io/guides/tutorials/bookmarks/)

But IntelliJ says always: `cannot resolve method(<lambda expression>)`.

What do I have to check?

```
this.accountRepository.findByUsername(userId).orElseThrow(() -> new UserNotFoundException(userId));

```
['https://Stackoverflow.com/questions/33053891', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2715720/']
You need to change the "Project language level" to "8 - Lambdas, type annotations etc.". You can find this option in "Project Settings" -> "Project"
In addition to the answers above look into you pom.xml file. Source and target should be 1.8 or higher. e.g.

```
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

```