Skip to content

Instantly share code, notes, and snippets.

@juancho088
Created June 11, 2018 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juancho088/a91fb5de41816eb5ba2934a2265f1ee8 to your computer and use it in GitHub Desktop.
Save juancho088/a91fb5de41816eb5ba2934a2265f1ee8 to your computer and use it in GitHub Desktop.
Movie Controller Without Factory
package com.myblockbuster.movies.controllers
import com.myblockbuster.core.Request
import com.myblockbuster.core.User
import com.myblockbuster.core.controllers.Controller
import com.myblockbuster.core.services.Service
import com.myblockbuster.movies.Movie
import com.myblockbuster.movies.services.MovieService
class MovieController: Controller<Movie> {
fun movie(request: Request?) : Any {
val service: Service<Movie, User> = MovieService()
return defaultRouting(Movie::class.java, request!!, service)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment