Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mobildata-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
btomi96
mobildata-server
Commits
64c9faa8
Commit
64c9faa8
authored
May 4, 2017
by
Alexandre Grison
Browse files
Options
Downloads
Patches
Plain Diff
no command line runner
parent
b0a7e22b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/kotlin/io/realworld/ApiApplication.kt
+1
-32
1 addition, 32 deletions
src/main/kotlin/io/realworld/ApiApplication.kt
with
1 addition
and
32 deletions
src/main/kotlin/io/realworld/ApiApplication.kt
+
1
−
32
View file @
64c9faa8
...
@@ -26,7 +26,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
...
@@ -26,7 +26,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@SpringBootApplication
@SpringBootApplication
class
ApiApplication
(
val
tagRepository
:
TagRepository
,
class
ApiApplication
(
val
tagRepository
:
TagRepository
,
val
userRepository
:
UserRepository
,
val
userRepository
:
UserRepository
,
val
articleRepository
:
ArticleRepository
)
:
WebMvcConfigurerAdapter
()
,
CommandLineRunner
{
val
articleRepository
:
ArticleRepository
)
:
WebMvcConfigurerAdapter
()
{
override
fun
addInterceptors
(
registry
:
InterceptorRegistry
?)
{
override
fun
addInterceptors
(
registry
:
InterceptorRegistry
?)
{
registry
!!
.
addInterceptor
(
exposeResponseInterceptor
())
registry
!!
.
addInterceptor
(
exposeResponseInterceptor
())
...
@@ -55,37 +55,6 @@ class ApiApplication(val tagRepository: TagRepository,
...
@@ -55,37 +55,6 @@ class ApiApplication(val tagRepository: TagRepository,
@Bean
@Bean
fun
validator
()
=
LocalValidatorFactoryBean
()
fun
validator
()
=
LocalValidatorFactoryBean
()
override
fun
run
(
vararg
p0
:
String
?)
{
/* val java = tagRepository.save(Tag(name = "java"))
val kotlin = tagRepository.save(Tag(name = "kotlin"))
val dev = tagRepository.save(Tag(name = "dev"))
val clojure = tagRepository.save(Tag(name = "clojure"))
var alex = userRepository.save(User(email = "a.grison@gmail.com",
password = BCrypt.hashpw("foofoo", BCrypt.gensalt()),
token = "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0OTM4MzE2NzEsInN1YiI6ImEuZ3Jpc29uQGdtYWlsLmNvbSIsImlzcyI6IktvdGxpbiZTcHJpbmciLCJleHAiOjE0OTQ2OTU2NzF9.nxRpiUsRgNGgJPhMws0GiidqihaQcTBv1MxPP7LNAKw",
username = "Alex", bio = "This is Alex",
image = "http://i0.kym-cdn.com/entries/icons/original/000/014/959/Screenshot_116.png"))
val rich = userRepository.save(User(email = "rich@gmail.com",
password = BCrypt.hashpw("barbar", BCrypt.gensalt()),
token = "lmao",
image = "https://pbs.twimg.com/media/Cbg6oKqUkAI2PAB.jpg",
username = "Rich", bio = "This is Rich", follows = mutableListOf(alex)))
alex.follows.add(rich)
alex = userRepository.save(alex)
articleRepository.save(Article(title = "Kotlin is fun", body = "Kotlin is somewhat fun", slug = "kotlin-is-fun",
author = alex, tagList = mutableListOf(dev, kotlin)))
articleRepository.save(Article(title = "Java is still cool", body = "Java is still cool", slug = "java-is-still-cool",
author = alex, tagList = mutableListOf(dev, java)))
articleRepository.save(Article(title = "Clojure is the future", body = "Clojure up!", slug = "clojure-is-the-future",
author = alex, tagList = mutableListOf(dev, clojure),
favorited = mutableListOf(rich)))
articleRepository.save(Article(title = "Clojure spec", body = "Clojure spec!", slug = "clojure-spec",
author = rich, tagList = mutableListOf(dev, clojure),
favorited = mutableListOf(alex)))*/
}
}
}
fun
main
(
args
:
Array
<
String
>)
{
fun
main
(
args
:
Array
<
String
>)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment