title: @JsonView annotation not working
body: <p>I am trying to deserialize several fields from my object in Spring using the <code>@JsonView</code> annotation. However, I add the annotation to my method, instead of deserializing the specified field, it returns an empty object.</p>
  
  <p>Here is my POJO:</p>
  
  <pre><code>@Entity
  data class Album(
          @JsonView(View.AlbumSummary::class)
          val title: String,
  
          @JsonView(View.AlbumSummary::class)
          @ManyToMany
          val artists: List&lt;Account&gt;,
  
          val dateReleased: LocalDate,
  
          val genre: String = GENRE_NA,
  
          @OneToMany(mappedBy = "album")
          val songs: List&lt;Song&gt; = ArrayList(),
  
          val description: String = ""
  )
  </code></pre>
  
  <p>And also, the method that implements the <code>@JsonView</code> annotation:</p>
  
  <pre><code>@JsonView(View.AlbumSummary::class)
  @RequestMapping("/home-recommendations/{userId}")
  fun getHomeRecommendations(@PathVariable userId: String): List&lt;Recommendation&gt; {
  
      val recommendations = ArrayList&lt;Recommendation&gt;()
  
      val user = accountRepository.findById(userId).get()
      val followingArtists = user.following.filter {
          it.following.isArtist
      }
      val suggestedArtists = followingArtists.shuffled().take(Random().nextInt(11) + 10)
  
      for (i in 0 until suggestedArtists.size) {
  
          val suggestedArtist = suggestedArtists[i].following
  
          val recommendedAlbums = suggestedArtist.albums.shuffled().take(Random().nextInt(6) + 10)
  
          recommendations.add(Recommendation("Because you listened to ${suggestedArtist.fullName}", Recommendation.TYPE_ALBUM, albums = recommendedAlbums))
  
      }
  
      return recommendations
  
  }
  </code></pre>
  
  <p>Edit: My gradle configuration:</p>
  
  <pre><code>buildscript {
      ext {
          kotlinVersion = '1.2.50'
          springBootVersion = '2.0.3.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
          classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
          classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
          classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}")
      }
  }
  
  apply plugin: 'kotlin'
  apply plugin: 'kotlin-spring'
  apply plugin: 'kotlin-jpa'
  apply plugin: 'eclipse'
  apply plugin: 'org.springframework.boot'
  apply plugin: 'io.spring.dependency-management'
  
  group = 'com.aceinteract'
  version = '0.0.1-SNAPSHOT'
  sourceCompatibility = 1.8
  compileKotlin {
      kotlinOptions {
          freeCompilerArgs = ["-Xjsr305=strict"]
          jvmTarget = "1.8"
      }
  }
  compileTestKotlin {
      kotlinOptions {
          freeCompilerArgs = ["-Xjsr305=strict"]
          jvmTarget = "1.8"
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  
  dependencies {
      compile('org.springframework.boot:spring-boot-starter-data-jpa')
      compile('org.springframework.boot:spring-boot-starter-data-rest')
      compile('org.springframework.boot:spring-boot-starter-jdbc')
      compile('org.springframework.boot:spring-boot-starter-mustache')
      compile('org.springframework.boot:spring-boot-starter-web')
      compile('com.fasterxml.jackson.module:jackson-module-kotlin')
      compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
      compile("org.jetbrains.kotlin:kotlin-reflect")
      runtime('org.postgresql:postgresql')
      testCompile('org.springframework.boot:spring-boot-starter-test')
      testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
  }
  </code></pre>
  
  <p>I can provide more code if needed. Thanks in advance.</p>
  
  <p>P.S. The same code works perfectly when the <code>@JsonView</code> annotation is removed from the method</p>
  
  <p>Also, I'm using IntelliJ Idea</p>