Skip to content

Instantly share code, notes, and snippets.

@JoseRFJuniorLLMs
Created January 17, 2018 08:13
Show Gist options
  • Save JoseRFJuniorLLMs/e204f18d992ffcf37bb222262e670269 to your computer and use it in GitHub Desktop.
Save JoseRFJuniorLLMs/e204f18d992ffcf37bb222262e670269 to your computer and use it in GitHub Desktop.
XIMBO WEB SERVICES.
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel>
<module name="restful-api-kotlin_main" target="1.8" />
<module name="restful-api-kotlin_test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Kotlin2JsCompilerArguments">
<option name="sourceMapEmbedSources" />
<option name="sourceMapPrefix" />
</component>
</project>
<component name="libraryTable">
<library name="Gradle: aopalliance:aopalliance:1.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/235ba8b489512805ac13a8f9ea77a1ca5ebe3e8/aopalliance-1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/4a4b6d692e17846a9f3da036438a7ac491d3c814/aopalliance-1.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: ch.qos.logback:logback-classic:1.1.11">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.11/ccedfbacef4a6515d2983e3f89ed753d5d4fb665/logback-classic-1.1.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.11/2a2f78be7ef674b6486f7b5463f05f40da5e163/logback-classic-1.1.11-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: ch.qos.logback:logback-core:1.1.11">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.11/88b8df40340eed549fb07e2613879bf6b006704d/logback-core-1.1.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.11/1b6214469321068fe4d58157768e1e039479fa1/logback-core-1.1.11-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: com.fasterxml:classmate:1.3.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.3.3/864c8e370a691e343210cc7c532fc198cee460d8/classmate-1.3.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.3.3/959904631fc3caef02ab82c4ee31c6882b910b12/classmate-1.3.3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: com.fasterxml.jackson.core:jackson-annotations:2.8.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.8.0/45b426f7796b741035581a176744d91090e2e6fb/jackson-annotations-2.8.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.8.0/29a1a95363d497e856c0a7d682e4f7973e334068/jackson-annotations-2.8.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: com.fasterxml.jackson.core:jackson-core:2.8.9">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.9/569b1752705da98f49aabe2911cc956ff7d8ed9d/jackson-core-2.8.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.9/8cf3613202ddcd495137f8cb944e2da69964a641/jackson-core-2.8.9-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: com.fasterxml.jackson.core:jackson-databind:2.8.9">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.8.9/4dfca3975be3c1a98eacb829e70f02e9a71bc159/jackson-databind-2.8.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.8.9/98e1b4171628d8f230f6a60b248de84ed04fab0d/jackson-databind-2.8.9-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: com.jayway.jsonpath:json-path:2.2.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jayway.jsonpath/json-path/2.2.0/22290d17944bd239fabf5ac69005a60a7ecbbbcb/json-path-2.2.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.jayway.jsonpath/json-path/2.2.0/546dfa7cadacf40752c42bfd12af3b7a935920af/json-path-2.2.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: com.vaadin.external.google:android-json:0.0.20131108.vaadin1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/fa26d351fe62a6a17f5cda1287c1c6110dec413f/android-json-0.0.20131108.vaadin1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/bf42d7e47a3228513b626dd7d37ac6f072aeca4f/android-json-0.0.20131108.vaadin1-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: commons-io:commons-io:2.4">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.4/b1b6ea3b7e4aa4f492509a4952029cd8e48019ad/commons-io-2.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.4/f2d8698c46d1167ff24b06a840a87d91a02db891/commons-io-2.4-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.5">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/de.flapdoodle.embed/de.flapdoodle.embed.mongo/1.50.5/2393e167c3c6ed6b896470fdb813244769ac0d3f/de.flapdoodle.embed.mongo-1.50.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/de.flapdoodle.embed/de.flapdoodle.embed.mongo/1.50.5/d84a21631e9b5d4445562ff349988976c6b2c78b/de.flapdoodle.embed.mongo-1.50.5-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: de.flapdoodle.embed:de.flapdoodle.embed.process:1.50.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/de.flapdoodle.embed/de.flapdoodle.embed.process/1.50.2/7f00ce5e05a6f7d58b2fffd04fbdbb15956bfa8/de.flapdoodle.embed.process-1.50.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/de.flapdoodle.embed/de.flapdoodle.embed.process/1.50.2/a61e56cffdffa1616f5b92c2ee62980ba2e835fa/de.flapdoodle.embed.process-1.50.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: javax.validation:validation-api:1.1.0.Final">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/8613ae82954779d518631e05daa73a6a954817d5/validation-api-1.1.0.Final.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/7d49b53caed9bd81d172807c3e096d24f3c57090/validation-api-1.1.0.Final-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: junit:junit:4.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: net.java.dev.jna:jna:4.2.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.2.2/5012450aee579c3118ff09461d5ce210e0cdc2a9/jna-4.2.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/4.2.2/948a9338b46e83bc029a0c500f1de0fc6eea8900/jna-4.2.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: net.java.dev.jna:jna-platform:4.0.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna-platform/4.0.0/deb6bf66918989b50209b8c9aaf3b2561af7f011/jna-platform-4.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna-platform/4.0.0/1499728f3ee900f7565c301dfb1513054b05b283/jna-platform-4.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: net.minidev:accessors-smart:1.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.minidev/accessors-smart/1.1/a527213f2fea112a04c9bdf0ec0264e34104cd08/accessors-smart-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.minidev/accessors-smart/1.1/b5c478091ad2bfd497758094b00936543393415b/accessors-smart-1.1-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: net.minidev:json-smart:2.2.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.minidev/json-smart/2.2.1/5b9e5df7a62d1279b70dc882b041d249c4f0b002/json-smart-2.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/net.minidev/json-smart/2.2.1/fe70f8807c06ef9dd27b695830149c118010308f/json-smart-2.2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.apache.commons:commons-compress:1.10">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.10/5eeb27c57eece1faf2d837868aeccc94d84dcc9a/commons-compress-1.10.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.10/f6e0a51b510eefa6448fd331b01915e82eb9f44/commons-compress-1.10-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.apache.commons:commons-lang3:3.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.1/905075e6c80f206bbe6cf1e809d2caa69f420c76/commons-lang3-3.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.1/8d30b90ae8bda4fbac8363161c8a9b5a99e23baf/commons-lang3-3.1-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.apache.tomcat.embed:tomcat-embed-core:8.5.16">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/8.5.16/1318c2a44de53b692cb42021dc3d9a2a185e65a4/tomcat-embed-core-8.5.16.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/8.5.16/7aeaf75588460ffdceaa6dad4224d5d219fb6855/tomcat-embed-core-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.apache.tomcat.embed:tomcat-embed-el:8.5.16">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.5.16/d8d33b26d42c3857c6d2a566dd842d2308582020/tomcat-embed-el-8.5.16.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.5.16/c6bf24ad647dee430dd4196520d028918a3698a8/tomcat-embed-el-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.16">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/8.5.16/8df572a6fa38c24a6366ab254b9bde496ed5ea95/tomcat-embed-websocket-8.5.16.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/8.5.16/8546ff2c5a9ffb86a518ba768c63e01712284b28/tomcat-embed-websocket-8.5.16-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.assertj:assertj-core:2.6.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.assertj/assertj-core/2.6.0/b532c3fc4f66bcfee4989a3514f1cd56203a33ad/assertj-core-2.6.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.assertj/assertj-core/2.6.0/86e8fd98e5ec52e93e3fa46d9bf5df7cca6d1bce/assertj-core-2.6.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.hamcrest:hamcrest-core:1.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b/hamcrest-core-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.hamcrest:hamcrest-library:1.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/47a7ee46628ab7133129cd7cef1e92657bc275e/hamcrest-library-1.3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.hibernate:hibernate-validator:5.3.5.Final">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-validator/5.3.5.Final/622a9bcef2eed6d41b5b8e0662c36212009e375/hibernate-validator-5.3.5.Final.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-validator/5.3.5.Final/901d21d67b3dfb7a7fdf2cde1bd0eb9ca989f2f3/hibernate-validator-5.3.5.Final-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.jboss.logging:jboss-logging:3.3.1.Final">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.1.Final/c46217ab74b532568c0ed31dc599db3048bd1b67/jboss-logging-3.3.1.Final.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.1.Final/9d32b33527abb934fb12035d8849f7b9c4804049/jboss-logging-3.3.1.Final-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.jetbrains:annotations:13.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/5991ca87ef1fb5544943d9abc5a9a37583fabe03/annotations-13.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-reflect:1.1.4-3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.1.4-3/9994f843b30b9d6f4b39b742ffb8637eb86d08d8/kotlin-reflect-1.1.4-3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.1.4-3/1a8d0c6759f620de77381bbc9a93ac1a26553b67/kotlin-reflect-1.1.4-3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.4-3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.4-3/7f07ece855a7d40d5ef430218593e92282ae2a74/kotlin-stdlib-1.1.4-3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.4-3/3f64b358bd71a3b615c8cb90f35c3152492d4b27/kotlin-stdlib-1.1.4-3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4-3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.1.4-3/e8c9cbfa33a3015fcc7581fe6a60a355bf7cd92c/kotlin-stdlib-jre7-1.1.4-3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.1.4-3/c2ecdd88b7e07ff2337fcb23c75ec9aa33b5fcef/kotlin-stdlib-jre7-1.1.4-3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.4-3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre8/1.1.4-3/3a4fbf3d403d15b42df34c00d36276f360e39040/kotlin-stdlib-jre8-1.1.4-3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre8/1.1.4-3/acf05e2b8a5873e8ef074b3a9cdb606302118fd1/kotlin-stdlib-jre8-1.1.4-3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.mockito:mockito-core:1.10.19">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.10.19/e8546f5bef4e061d8dd73895b4e8f40e3fe6effe/mockito-core-1.10.19.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/1.10.19/8269667b73d9616600359a9b0ba1b1c7d0cf7a97/mockito-core-1.10.19-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.mongodb:bson:3.4.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/bson/3.4.2/8455e0c6926ff2bf444325ea46fd8b74adaf0362/bson-3.4.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/bson/3.4.2/45d50be5acaa04e372d1f9621b5f53abde8d4267/bson-3.4.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.mongodb:mongodb-driver:3.4.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver/3.4.2/d565cc4db7fd756973b1500424577a503d17f48a/mongodb-driver-3.4.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver/3.4.2/c9ed6ee227ea070e1568ad5276e7b8891abd8ebf/mongodb-driver-3.4.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.mongodb:mongodb-driver-core:3.4.2">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver-core/3.4.2/d0a18b4e46fe79467a71d7f9f1bc5932de670829/mongodb-driver-core-3.4.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/mongodb-driver-core/3.4.2/1676e26aa86a3c8af0fb1a9eda4b00000062d649/mongodb-driver-core-3.4.2-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.objenesis:objenesis:2.1">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/2.1/87c0ea803b69252868d09308b4618f766f135a96/objenesis-2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/2.1/611a57d836e2c320d59f9851d4ad587f3c8472e/objenesis-2.1-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.ow2.asm:asm:5.0.3">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/5.0.3/dcc2193db20e19e1feca8b1240dbbc4e190824fa/asm-5.0.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/5.0.3/f0f24f6666c1a15c7e202e91610476bd4ce59368/asm-5.0.3-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.skyscreamer:jsonassert:1.4.0">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.4.0/9cdbb373a06f6513e51e8c545ee6a5e981463edb/jsonassert-1.4.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.4.0/49efe8c34f11f1c0e2a1d8e297f59ec84adcdf6d/jsonassert-1.4.0-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.slf4j:jcl-over-slf4j:1.7.25">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/jcl-over-slf4j/1.7.25/f8c32b13ff142a513eeb5b6330b1588dcb2c0461/jcl-over-slf4j-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/jcl-over-slf4j/1.7.25/ffd0827a7c67d5915b7dc611afbda56a1f247191/jcl-over-slf4j-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.slf4j:jul-to-slf4j:1.7.25">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.25/af5364cd6679bfffb114f0dec8a157aaa283b76/jul-to-slf4j-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.25/bcea1530927f59b5128841d3571f879ce3af2e86/jul-to-slf4j-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.slf4j:log4j-over-slf4j:1.7.25">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/log4j-over-slf4j/1.7.25/a87bb47468f47ee7aabbd54f93e133d4215769c3/log4j-over-slf4j-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/log4j-over-slf4j/1.7.25/42a10e06ab88cbe5f31253ffb8c0bca96b34f81d/log4j-over-slf4j-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.slf4j:slf4j-api:1.7.25">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/da76ca59f6a57ee3102f8f9bd9cee742973efa8a/slf4j-api-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.25/962153db4a9ea71b79d047dfd1b2a0d80d8f4739/slf4j-api-1.7.25-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/1.5.6.RELEASE/a6e13da038c6eb8b8793795b3189d5ff3f39caa0/spring-boot-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/1.5.6.RELEASE/886dd7e892be7916e04323269afcf24b0211dae5/spring-boot-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-autoconfigure:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/1.5.6.RELEASE/436d14480a4ebeaca7cd223ab97790d515f46ad2/spring-boot-autoconfigure-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/1.5.6.RELEASE/feba7f214812233eba0de5e19a270438d9928c31/spring-boot-autoconfigure-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-devtools:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-devtools/1.5.6.RELEASE/491de9b0131a4210de1ec449aad8366e2540f86/spring-boot-devtools-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-devtools/1.5.6.RELEASE/49a3f13209bb4b8de29a3e99c84cdf30719bfd93/spring-boot-devtools-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/1.5.6.RELEASE/58c72d105fdf41f605c15c243b72300fa78cccd1/spring-boot-starter-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/1.5.6.RELEASE/532858b4ff55e3ffb0dc68a715d4a73ab6a68c2d/spring-boot-starter-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter-data-mongodb:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-mongodb/1.5.6.RELEASE/7092c545d6f472d1b70d333e375f01fe0e507a19/spring-boot-starter-data-mongodb-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-mongodb/1.5.6.RELEASE/f3d07f7ae156d23f8c24772b840cdc136bb0648e/spring-boot-starter-data-mongodb-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter-logging:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/1.5.6.RELEASE/74a50fb623c47d76c71402d8c6cc4ac4ba71d39e/spring-boot-starter-logging-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/1.5.6.RELEASE/ea94139e0f9d7ce2d9f3cb278c83eced9f2e66df/spring-boot-starter-logging-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter-security:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-security/1.5.6.RELEASE/cefa13401ad98d54a01b83c7ac041170e7a7f4f/spring-boot-starter-security-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-security/1.5.6.RELEASE/cb200d20e6c6c2564ed98bde6d18d82cad6c0242/spring-boot-starter-security-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter-test:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-test/1.5.6.RELEASE/a0e9b338bf492ddc68051e7d4ed62f2cbad067ef/spring-boot-starter-test-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-test/1.5.6.RELEASE/516c3715c8e6bb7adf607128a9aa92c8247b765/spring-boot-starter-test-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter-tomcat:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/1.5.6.RELEASE/1d0960e91dfdad2b6b82700ba1613c006355669/spring-boot-starter-tomcat-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/1.5.6.RELEASE/4ad01d5173018c0737a6c2d920351f0133f5cec/spring-boot-starter-tomcat-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/1.5.6.RELEASE/6f47b0a9e7e39b46b9e66ebdd2bff1c7edee5930/spring-boot-starter-web-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/1.5.6.RELEASE/38c7b76887223988edee64adc10da99d4bb97890/spring-boot-starter-web-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-test:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test/1.5.6.RELEASE/7bf97882d08b0ae5f61e5a6ced99451663a02a5d/spring-boot-test-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test/1.5.6.RELEASE/e3566bb7f9b6a222ff25f0de4ad865a734e4cbf6/spring-boot-test-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.boot:spring-boot-test-autoconfigure:1.5.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test-autoconfigure/1.5.6.RELEASE/d4fdc79a4a1331718465ba4564a0a3555f1e0faa/spring-boot-test-autoconfigure-1.5.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test-autoconfigure/1.5.6.RELEASE/8ddb370d5dc790044a876fdc5095ca48892255c5/spring-boot-test-autoconfigure-1.5.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.data:spring-data-commons:1.13.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/1.13.6.RELEASE/ed21344ea782672928cee7e6bfad655c399c0b94/spring-data-commons-1.13.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/1.13.6.RELEASE/7e02733999787cfdfff59cc3aea353f629c17817/spring-data-commons-1.13.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.data:spring-data-mongodb:1.10.6.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-mongodb/1.10.6.RELEASE/39070085c11450e1dbfb3fa1da2fc12b77d17314/spring-data-mongodb-1.10.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-mongodb/1.10.6.RELEASE/5c917b702a5f42b69b30e7fda656787d42403f9f/spring-data-mongodb-1.10.6.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.security:spring-security-config:4.2.3.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-config/4.2.3.RELEASE/9f3771903616e33521836fd999d63efbfebf90d/spring-security-config-4.2.3.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-config/4.2.3.RELEASE/9e3741f7cb7db06829fc818e38f58bbe9f5a0b94/spring-security-config-4.2.3.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.security:spring-security-core:4.2.3.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-core/4.2.3.RELEASE/5c0e47a47036c94d6fdd02696bf52be6d1adbd4d/spring-security-core-4.2.3.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-core/4.2.3.RELEASE/5c620ead93220cae89562bd3eda6ec875c43e1db/spring-security-core-4.2.3.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.security:spring-security-test:4.2.3.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-test/4.2.3.RELEASE/f93339f597290d85a596f25a7841b9109b79ced6/spring-security-test-4.2.3.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-test/4.2.3.RELEASE/b18e17a4e49ab7b5c73562a99a2c95c64ded110/spring-security-test-4.2.3.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework.security:spring-security-web:4.2.3.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-web/4.2.3.RELEASE/7a03e737484ca232d7146852f06d067ac21427ac/spring-security-web-4.2.3.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-web/4.2.3.RELEASE/2804ac6a00705bed0836fe5826e0496ace681469/spring-security-web-4.2.3.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-aop:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/4.3.10.RELEASE/3a8c23246045e5e1dbd7d91354741b165e997a88/spring-aop-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/4.3.10.RELEASE/807108d49129a5445be42c9bc543792ad7ade8e0/spring-aop-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-beans:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/4.3.10.RELEASE/9d89b786f755f9b1da344f10f6f045f927679a72/spring-beans-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/4.3.10.RELEASE/eb22a9c7f612da75e9234cf089c2069e32f44b3c/spring-beans-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-context:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/4.3.10.RELEASE/645ce6fdba38448d183a1374506fc24036009869/spring-context-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/4.3.10.RELEASE/b891c5162908b5d092240c24df1b5e972a17768d/spring-context-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-core:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.3.10.RELEASE/db1462df62dbedad7244da30ec471390660271c0/spring-core-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.3.10.RELEASE/74cacfe24c0f88a4577990fb24c9fdf4a73f443c/spring-core-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-expression:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/4.3.10.RELEASE/4975ab542028945ab98fefba772472a40495d7ca/spring-expression-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/4.3.10.RELEASE/235f4acafda7a7f9a08a9f49f667615641305a11/spring-expression-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-test:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/4.3.10.RELEASE/e82664ba39497626cd29298cb16c161d901bfbee/spring-test-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/4.3.10.RELEASE/ecac20e95b228f1b9612aacee0787d436d118a59/spring-test-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-tx:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/4.3.10.RELEASE/569d30fd8d2050910e0271b838cf927ebb7efcdc/spring-tx-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/4.3.10.RELEASE/c66d09f33f6b2e46442f3445f0611efbc421e85/spring-tx-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-web:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/4.3.10.RELEASE/6344501cb03cb4787c67cf3f820a471e07b9203b/spring-web-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/4.3.10.RELEASE/e350109ba4a031049863e3e9d9f3d386ef73cfd9/spring-web-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.springframework:spring-webmvc:4.3.10.RELEASE">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/4.3.10.RELEASE/6809017a5a76bdaf1957f1cc0a892d448fc6f3df/spring-webmvc-4.3.10.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/4.3.10.RELEASE/8cdffc946fec6396a9781e47c2822c8986c3759e/spring-webmvc-4.3.10.RELEASE-sources.jar!/" />
</SOURCES>
</library>
</component>
<component name="libraryTable">
<library name="Gradle: org.yaml:snakeyaml:1.17">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.17/7a27ea250c5130b2922b86dea63cbb1cc10a660c/snakeyaml-1.17.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.17/63577e87886c76228db9f8a2c50ea43cde5072eb/snakeyaml-1.17-sources.jar!/" />
</SOURCES>
</library>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/restful-api-kotlin.iml" filepath="$PROJECT_DIR$/restful-api-kotlin.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/restful-api-kotlin_main.iml" filepath="$PROJECT_DIR$/.idea/modules/restful-api-kotlin_main.iml" group="restful-api-kotlin" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/restful-api-kotlin_test.iml" filepath="$PROJECT_DIR$/.idea/modules/restful-api-kotlin_test.iml" group="restful-api-kotlin" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="restful-api-kotlin:main" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.8" useProjectSettings="false">
<compilerSettings />
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/../../build/kotlin-classes/main" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="restful-api-kotlin_main" />
<option name="jvmTarget" value="1.8" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
<option name="pluginOptions">
<array>
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.stereotype.Component" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.transaction.annotation.Transactional" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.scheduling.annotation.Async" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.cache.annotation.Cacheable" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.boot.test.context.SpringBootTest" />
</array>
</option>
<option name="pluginClasspaths">
<array>
<option value="$KOTLIN_BUNDLED$/lib/allopen-compiler-plugin.jar" />
</array>
</option>
</compilerArguments>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/../../out/production/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/main">
<sourceFolder url="file://$MODULE_DIR$/../../src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/kotlin" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../../src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-data-mongodb:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.5" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-security:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-reflect:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver:3.4.2" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.data:spring-data-mongodb:1.10.6.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: org.springframework.boot:spring-boot-devtools:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: de.flapdoodle.embed:de.flapdoodle.embed.process:1.50.2" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-aop:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-config:4.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-web:4.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-tomcat:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.hibernate:hibernate-validator:5.3.5.Final" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-databind:2.8.9" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-web:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-webmvc:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-autoconfigure:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-logging:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-core:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.yaml:snakeyaml:1.17" level="project" />
<orderEntry type="library" name="Gradle: org.mongodb:bson:3.4.2" level="project" />
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-tx:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-context:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-beans:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-expression:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.data:spring-data-commons:1.13.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.1" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.2.2" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna-platform:4.0.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-compress:1.10" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-core:4.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.apache.tomcat.embed:tomcat-embed-core:8.5.16" level="project" />
<orderEntry type="library" name="Gradle: org.apache.tomcat.embed:tomcat-embed-el:8.5.16" level="project" />
<orderEntry type="library" name="Gradle: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.16" level="project" />
<orderEntry type="library" name="Gradle: javax.validation:validation-api:1.1.0.Final" level="project" />
<orderEntry type="library" name="Gradle: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml:classmate:1.3.3" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-core:2.8.9" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Gradle: ch.qos.logback:logback-classic:1.1.11" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: ch.qos.logback:logback-core:1.1.11" level="project" />
</component>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="restful-api-kotlin:test" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" external.system.module.group="" external.system.module.type="sourceSet" external.system.module.version="0.0.1-SNAPSHOT" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.8" useProjectSettings="false">
<compilerSettings />
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/../../build/kotlin-classes/test" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="restful-api-kotlin_main" />
<option name="jvmTarget" value="1.8" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
<option name="pluginOptions">
<array>
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.stereotype.Component" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.transaction.annotation.Transactional" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.scheduling.annotation.Async" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.cache.annotation.Cacheable" />
<option value="plugin:org.jetbrains.kotlin.allopen:annotation=org.springframework.boot.test.context.SpringBootTest" />
</array>
</option>
<option name="pluginClasspaths">
<array>
<option value="$KOTLIN_BUNDLED$/lib/allopen-compiler-plugin.jar" />
</array>
</option>
</compilerArguments>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output-test url="file://$MODULE_DIR$/../../out/test/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$/../../src/test">
<sourceFolder url="file://$MODULE_DIR$/../../src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/kotlin" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../src/test/resources" type="java-test-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="restful-api-kotlin_main" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-data-mongodb:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.50.5" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-security:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-web:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-reflect:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-test:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-test:4.2.3.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: org.springframework.boot:spring-boot-devtools:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver:3.4.2" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.data:spring-data-mongodb:1.10.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: de.flapdoodle.embed:de.flapdoodle.embed.process:1.50.2" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-aop:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-config:4.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-web:4.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-tomcat:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.hibernate:hibernate-validator:5.3.5.Final" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-databind:2.8.9" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-web:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-webmvc:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4-3" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-test:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-test-autoconfigure:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: com.jayway.jsonpath:json-path:2.2.0" level="project" />
<orderEntry type="library" name="Gradle: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Gradle: org.assertj:assertj-core:2.6.0" level="project" />
<orderEntry type="library" name="Gradle: org.mockito:mockito-core:1.10.19" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" name="Gradle: org.skyscreamer:jsonassert:1.4.0" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-core:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-test:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.security:spring-security-core:4.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-autoconfigure:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.boot:spring-boot-starter-logging:1.5.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.yaml:snakeyaml:1.17" level="project" />
<orderEntry type="library" name="Gradle: org.mongodb:bson:3.4.2" level="project" />
<orderEntry type="library" name="Gradle: org.mongodb:mongodb-driver-core:3.4.2" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-tx:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-context:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-beans:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework:spring-expression:4.3.10.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.springframework.data:spring-data-commons:1.13.6.RELEASE" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-lang3:3.1" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna:4.2.2" level="project" />
<orderEntry type="library" name="Gradle: net.java.dev.jna:jna-platform:4.0.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.commons:commons-compress:1.10" level="project" />
<orderEntry type="library" name="Gradle: aopalliance:aopalliance:1.0" level="project" />
<orderEntry type="library" name="Gradle: org.apache.tomcat.embed:tomcat-embed-core:8.5.16" level="project" />
<orderEntry type="library" name="Gradle: org.apache.tomcat.embed:tomcat-embed-el:8.5.16" level="project" />
<orderEntry type="library" name="Gradle: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.16" level="project" />
<orderEntry type="library" name="Gradle: javax.validation:validation-api:1.1.0.Final" level="project" />
<orderEntry type="library" name="Gradle: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml:classmate:1.3.3" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-annotations:2.8.0" level="project" />
<orderEntry type="library" name="Gradle: com.fasterxml.jackson.core:jackson-core:2.8.9" level="project" />
<orderEntry type="library" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Gradle: net.minidev:json-smart:2.2.1" level="project" />
<orderEntry type="library" name="Gradle: org.objenesis:objenesis:2.1" level="project" />
<orderEntry type="library" name="Gradle: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" name="Gradle: ch.qos.logback:logback-classic:1.1.11" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: org.slf4j:log4j-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Gradle: net.minidev:accessors-smart:1.1" level="project" />
<orderEntry type="library" name="Gradle: ch.qos.logback:logback-core:1.1.11" level="project" />
<orderEntry type="library" name="Gradle: org.ow2.asm:asm:5.0.3" level="project" />
</component>
<component name="TestModuleProperties" production-module="restful-api-kotlin_main" />
</module>
buildscript {
ext {
kotlinVersion = '1.1.4-3'
springBootVersion = '1.5.6.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}")
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
archivesBaseName = 'ponto-inteligente-api'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
compile('de.flapdoodle.embed:de.flapdoodle.embed.mongo')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-web')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
runtime('org.springframework.boot:spring-boot-devtools')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
}
#Mon Jan 15 13:32:10 BRST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
web: java -Dspring.data.mongodb.uri=$MONGODB_URI -Dserver.port=$PORT -jar build/libs/ponto-inteligente-api-0.0.1-SNAPSHOT.jar

API RESTful em Kotlin para sistema de controle de ponto

API RESTful com Spring Boot, Kotlin e MongoDB

Detalhes da API RESTful

A API RESTful de Ponto Inteligente contém as seguintes características:

  • Projeto criado com Spring Boot e Kotlin
  • Banco de dados NoSQL MongoDB
  • Autenticação e autorização Basic com Spring Security
  • Testes unitários e de integração com JUnit e Mockito
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="restful-api-kotlin" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="0.0.1-SNAPSHOT" type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
package com.kazale.pontointeligente.api.pontointeligenteapi.controllers
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
import com.kazale.pontointeligente.api.pontointeligenteapi.services.EmpresaService
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import com.kazale.pontointeligente.api.pontointeligenteapi.dtos.CadastroPFDto
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.PerfilEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.response.Response
import com.kazale.pontointeligente.api.pontointeligenteapi.utils.SenhaUtils
import org.springframework.http.ResponseEntity
import org.springframework.validation.BindingResult
import org.springframework.validation.ObjectError
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import javax.validation.Valid
@RestController
@RequestMapping("/api/cadastrar-pf")
class CadastroPFController(val empresaService: EmpresaService,
val funcionarioService: FuncionarioService) {
@PostMapping
fun cadastrar(@Valid @RequestBody cadastroPFDto: CadastroPFDto,
result: BindingResult): ResponseEntity<Response<CadastroPFDto>> {
val response: Response<CadastroPFDto> = Response<CadastroPFDto>()
val empresa: Empresa? = empresaService.buscarPorCnpj(cadastroPFDto.cnpj)
validarDadosExistentes(cadastroPFDto, empresa, result)
if (result.hasErrors()) {
for (erro in result.allErrors) response.erros.add(erro.defaultMessage)
return ResponseEntity.badRequest().body(response)
}
val funcionario: Funcionario = converterDtoParaFuncionario(cadastroPFDto, empresa!!)
funcionarioService.persistir(funcionario)
response.data = converterCadastroPFDto(funcionario, empresa!!)
return ResponseEntity.ok(response)
}
private fun validarDadosExistentes(cadastroPFDto: CadastroPFDto, empresa: Empresa?,
result: BindingResult) {
if (empresa == null) {
result.addError(ObjectError("empresa", "Empresa não cadastrada."))
}
val funcionarioCpf: Funcionario? = funcionarioService.buscarPorCpf(cadastroPFDto.cpf)
if (funcionarioCpf != null) {
result.addError(ObjectError("funcionario", "CPF já existente."))
}
val funcionarioEmail: Funcionario? = funcionarioService.buscarPorEmail(cadastroPFDto.email)
if (funcionarioEmail != null) {
result.addError(ObjectError("funcionario", "Email já existente."))
}
}
private fun converterDtoParaFuncionario(cadastroPFDto: CadastroPFDto, empresa: Empresa) =
Funcionario(cadastroPFDto.nome, cadastroPFDto.email,
SenhaUtils().gerarBCrypt(cadastroPFDto.senha), cadastroPFDto.cpf,
PerfilEnum.ROLE_USUARIO, empresa.id.toString(),
cadastroPFDto.valorHora?.toDouble(), cadastroPFDto.qtdHorasTrabalhoDia?.toFloat(),
cadastroPFDto.qtdHorasAlmoco?.toFloat(), cadastroPFDto.id)
private fun converterCadastroPFDto(funcionario: Funcionario, empresa: Empresa): CadastroPFDto =
CadastroPFDto(funcionario.nome, funcionario.email, "", funcionario.cpf,
empresa.cnpj, empresa.id.toString(),funcionario.valorHora.toString(),
funcionario.qtdHorasTrabalhoDia.toString(),
funcionario.qtdHorasTrabalhoDia.toString(),
funcionario.id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.controllers
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.dtos.CadastroPJDto
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.PerfilEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.response.Response
import com.kazale.pontointeligente.api.pontointeligenteapi.services.EmpresaService
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import com.kazale.pontointeligente.api.pontointeligenteapi.utils.SenhaUtils
import org.springframework.http.ResponseEntity
import org.springframework.validation.BindingResult
import org.springframework.validation.ObjectError
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import javax.validation.Valid
@RestController
@RequestMapping("/api/cadastrar-pj")
class CadastroPJController(val empresaService: EmpresaService,
val funcionarioService: FuncionarioService) {
@PostMapping
fun cadastrar(@Valid @RequestBody cadastroPJDto: CadastroPJDto,
result: BindingResult): ResponseEntity<Response<CadastroPJDto>> {
val response: Response<CadastroPJDto> = Response<CadastroPJDto>()
validarDadosExistentes(cadastroPJDto, result)
if (result.hasErrors()) {
for (erro in result.allErrors) response.erros.add(erro.defaultMessage)
return ResponseEntity.badRequest().body(response)
}
val empresa: Empresa = converterDtoParaEmpresa(cadastroPJDto)
empresaService.persistir(empresa)
val funcionario: Funcionario = converterDtoParaFuncionario(cadastroPJDto, empresa)
funcionarioService.persistir(funcionario)
response.data = converterCadastroPJDto(funcionario, empresa)
return ResponseEntity.ok(response)
}
private fun validarDadosExistentes(cadastroPJDto: CadastroPJDto, result: BindingResult) {
val empresa: Empresa? = empresaService.buscarPorCnpj(cadastroPJDto.cnpj)
if (empresa != null) {funcionarioService
result.addError(ObjectError("empresa", "Empresa já existente."))
}
val funcionarioCpf: Funcionario? = funcionarioService.buscarPorCpf(cadastroPJDto.cpf)
if (funcionarioCpf != null) {
result.addError(ObjectError("funcionario", "CPF já existente."))
}
val funcionarioEmail: Funcionario? = .buscarPorEmail(cadastroPJDto.email)
if (funcionarioEmail != null) {
result.addError(ObjectError("funcionario", "Email já existente."))
}
}
private fun converterDtoParaEmpresa(cadastroPJDto: CadastroPJDto): Empresa =
Empresa(cadastroPJDto.razaoSocial, cadastroPJDto.cnpj)
private fun converterDtoParaFuncionario(cadastroPJDto: CadastroPJDto, empresa: Empresa) =
Funcionario(cadastroPJDto.nome, cadastroPJDto.email,
SenhaUtils().gerarBCrypt(cadastroPJDto.senha), cadastroPJDto.cpf,
PerfilEnum.ROLE_ADMIN, empresa.id.toString())
private fun converterCadastroPJDto(funcionario: Funcionario, empresa: Empresa): CadastroPJDto =
CadastroPJDto(funcionario.nome, funcionario.email, "", funcionario.cpf,
empresa.cnpj, empresa.razaoSocial, funcionario.id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.controllers
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
import com.kazale.pontointeligente.api.pontointeligenteapi.dtos.EmpresaDto
import com.kazale.pontointeligente.api.pontointeligenteapi.response.Response
import com.kazale.pontointeligente.api.pontointeligenteapi.services.EmpresaService
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
@RestController
@RequestMapping("/api/empresas")
class EmpresaController(val empresaService: EmpresaService) {
@GetMapping(value = "/cnpj/{cnpj}")
fun buscarPorCnpj(@PathVariable("cnpj") cnpj: String): ResponseEntity<Response<EmpresaDto>> {
val response: Response<EmpresaDto> = Response<EmpresaDto>()
val empresa: Empresa? = empresaService.buscarPorCnpj(cnpj)
if (empresa == null) {
response.erros.add("Empresa não econtrada para o CNPJ ${cnpj}")
return ResponseEntity.badRequest().body(response)
}
response.data = converterEmpresaDto(empresa)
return ResponseEntity.ok(response)
}
private fun converterEmpresaDto(empresa: Empresa): EmpresaDto =
EmpresaDto(empresa.razaoSocial, empresa.cnpj, empresa.id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.controllers
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.dtos.FuncionarioDto
import com.kazale.pontointeligente.api.pontointeligenteapi.response.Response
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import com.kazale.pontointeligente.api.pontointeligenteapi.utils.SenhaUtils
import org.springframework.http.ResponseEntity
import org.springframework.validation.BindingResult
import org.springframework.validation.ObjectError
import org.springframework.web.bind.annotation.*
import javax.validation.Valid
@RestController
@RequestMapping("/api/funcionarios")
class FuncionarioController(val funcionarioService: FuncionarioService) {
@PutMapping(value = "/{id}")
fun atualizar(@PathVariable("id") id: String, @Valid @RequestBody funcionarioDto: FuncionarioDto,
result: BindingResult): ResponseEntity<Response<FuncionarioDto>> {
val response: Response<FuncionarioDto> = Response<FuncionarioDto>()
val funcionario: Funcionario? = funcionarioService.buscarPorId(id)
if (funcionario == null) {
result.addError(ObjectError("funcionario", "Funcionário não encontrado."))
}
if (result.hasErrors()) {
for (erro in result.allErrors) response.erros.add(erro.defaultMessage)
return ResponseEntity.badRequest().body(response)
}
val funcAtualizar: Funcionario = atualizarDadosFuncionario(funcionario!!, funcionarioDto)
funcionarioService.persistir(funcAtualizar)
response.data = converterFuncionarioDto(funcAtualizar)
return ResponseEntity.ok(response)
}
private fun atualizarDadosFuncionario(funcionario: Funcionario,
funcionarioDto: FuncionarioDto): Funcionario {
var senha: String
if (funcionarioDto.senha == null) {
senha = funcionario.senha
} else {
senha = SenhaUtils().gerarBCrypt(funcionarioDto.senha)
}
return Funcionario(funcionarioDto.nome, funcionario.email, senha,
funcionario.cpf, funcionario.perfil, funcionario.empresaId,
funcionarioDto.valorHora?.toDouble(),
funcionarioDto.qtdHorasTrabalhoDia?.toFloat(),
funcionarioDto.qtdHorasAlmoco?.toFloat(),
funcionario.id)
}
private fun converterFuncionarioDto(funcionario: Funcionario): FuncionarioDto =
FuncionarioDto(funcionario.nome, funcionario.email, "",
funcionario.valorHora.toString(), funcionario.qtdHorasTrabalhoDia.toString(),
funcionario.qtdHorasAlmoco.toString(), funcionario.id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.controllers
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Lancamento
import com.kazale.pontointeligente.api.pontointeligenteapi.dtos.LancamentoDto
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.TipoEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.response.Response
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import com.kazale.pontointeligente.api.pontointeligenteapi.services.LancamentoService
import org.springframework.beans.factory.annotation.Value
import org.springframework.data.domain.Page
import org.springframework.data.domain.PageRequest
import org.springframework.data.domain.Sort
import org.springframework.http.ResponseEntity
import org.springframework.security.access.prepost.PreAuthorize
import org.springframework.validation.BindingResult
import org.springframework.validation.ObjectError
import org.springframework.web.bind.annotation.*
import javax.validation.Valid
import java.text.SimpleDateFormat
@RestController
@RequestMapping("/api/lancamentos")
class LancamentoController(val lancamentoService: LancamentoService,
val funcionarioService: FuncionarioService) {
private val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
@Value("\${paginacao.qtd_por_pagina}")
val qtdPorPagina: Int = 15
@GetMapping(value = "/funcionario/{funcionarioId}")
fun listarPorFuncionarioId(@PathVariable("funcionarioId") funcionarioId: String,
@RequestParam(value = "pag", defaultValue = "0") pag: Int,
@RequestParam(value = "ord", defaultValue = "id") ord: String,
@RequestParam(value = "dir", defaultValue = "DESC") dir: String):
ResponseEntity<Response<Page<LancamentoDto>>> {
val response: Response<Page<LancamentoDto>> = Response<Page<LancamentoDto>>()
val pageRequest: PageRequest = PageRequest(pag, qtdPorPagina, Sort.Direction.valueOf(dir), ord)
val lancamentos: Page<Lancamento> = lancamentoService.buscarPorFuncionarioId(funcionarioId, pageRequest)
val lancamentosDto: Page<LancamentoDto> =
lancamentos.map { lancamento -> converterLancamentoDto(lancamento) }
response.data = lancamentosDto
return ResponseEntity.ok(response)
}
@GetMapping(value = "/{id}")
fun listarPorId(@PathVariable("id") id: String): ResponseEntity<Response<LancamentoDto>> {
val response: Response<LancamentoDto> = Response<LancamentoDto>()
val lancamento: Lancamento? = lancamentoService.buscarPorId(id)
if (lancamento == null) {
response.erros.add("Lançamento não encontrado para o id $id")
return ResponseEntity.badRequest().body(response)
}
response.data = converterLancamentoDto(lancamento)
return ResponseEntity.ok(response)
}
@PostMapping
fun adicionar(@Valid @RequestBody lancamentoDto: LancamentoDto,
result: BindingResult): ResponseEntity<Response<LancamentoDto>> {
val response: Response<LancamentoDto> = Response<LancamentoDto>()
validarFuncionario(lancamentoDto, result)
if (result.hasErrors()) {
for (erro in result.allErrors) response.erros.add(erro.defaultMessage)
return ResponseEntity.badRequest().body(response)
}
val lancamento: Lancamento = converterDtoParaLancamento(lancamentoDto, result)
lancamentoService.persistir(lancamento)
response.data = converterLancamentoDto(lancamento)
return ResponseEntity.ok(response)
}
@PutMapping(value = "/{id}")
fun atualizar(@PathVariable("id") id: String, @Valid @RequestBody lancamentoDto: LancamentoDto,
result: BindingResult): ResponseEntity<Response<LancamentoDto>> {
val response: Response<LancamentoDto> = Response<LancamentoDto>()
validarFuncionario(lancamentoDto, result)
lancamentoDto.id = id
val lancamento: Lancamento = converterDtoParaLancamento(lancamentoDto, result)
if (result.hasErrors()) {
for (erro in result.allErrors) response.erros.add(erro.defaultMessage)
return ResponseEntity.badRequest().body(response)
}
lancamentoService.persistir(lancamento)
response.data = converterLancamentoDto(lancamento)
return ResponseEntity.ok(response)
}
@DeleteMapping(value = "/{id}")
@PreAuthorize("hasAnyRole('ADMIN')")
fun remover(@PathVariable("id") id: String): ResponseEntity<Response<String>> {
val response: Response<String> = Response<String>()
val lancamento: Lancamento? = lancamentoService.buscarPorId(id)
if (lancamento == null) {
response.erros.add("Erro ao remover lançamento. Registro não encontrado para o id $id")
return ResponseEntity.badRequest().body(response)
}
lancamentoService.remover(id)
return ResponseEntity.ok(Response<String>())
}
private fun validarFuncionario(lancamentoDto: LancamentoDto, result: BindingResult) {
if (lancamentoDto.funcionarioId == null) {
result.addError(ObjectError("funcionario", "Funcionário não informado."))
return
}
val funcionario: Funcionario? = funcionarioService.buscarPorId(lancamentoDto.funcionarioId)
if (funcionario == null) {
result.addError(ObjectError("funcionario", "Funcionário não encontrado. ID inexistente."));
}
}
private fun converterLancamentoDto(lancamento: Lancamento): LancamentoDto =
LancamentoDto(dateFormat.format(lancamento.data), lancamento.tipo.toString(),
lancamento.descricao, lancamento.localizacao,
lancamento.funcionarioId, lancamento.id)
private fun converterDtoParaLancamento(lancamentoDto: LancamentoDto,
result: BindingResult): Lancamento {
if (lancamentoDto.id != null) {
val lanc: Lancamento? = lancamentoService.buscarPorId(lancamentoDto.id!!)
if (lanc == null) result.addError(ObjectError("lancamento", "Lançamento não encontrado."))
}
return Lancamento(dateFormat.parse(lancamentoDto.data), TipoEnum.valueOf(lancamentoDto.tipo!!),
lancamentoDto.funcionarioId!!, lancamentoDto.descricao,
lancamentoDto.localizacao, lancamentoDto.id)
}
}
package com.kazale.pontointeligente.api.pontointeligenteapi.documents
import org.springframework.data.annotation.Id
import org.springframework.data.mongodb.core.mapping.Document
@Document
data class Empresa (
val razaoSocial: String,
val cnpj: String,
@Id val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.documents
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.PerfilEnum
import org.springframework.data.annotation.Id
import org.springframework.data.mongodb.core.mapping.Document
@Document
data class Funcionario (
val nome: String,
val email: String,
val senha: String,
val cpf: String,
val perfil: PerfilEnum,
val empresaId: String,
val valorHora: Double? = 0.0,
val qtdHorasTrabalhoDia: Float? = 0.0f,
val qtdHorasAlmoco: Float? = 0.0f,
@Id val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.documents
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.TipoEnum
import org.springframework.data.annotation.Id
import java.util.*
data class Lancamento (
val data: Date,
val tipo: TipoEnum,
val funcionarioId: String,
val descricao: String? = "",
val localizacao: String? = "",
@Id val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.dtos
import org.hibernate.validator.constraints.Email
import org.hibernate.validator.constraints.Length
import org.hibernate.validator.constraints.NotEmpty
import org.hibernate.validator.constraints.br.CNPJ
import org.hibernate.validator.constraints.br.CPF
data class CadastroPFDto (
@get:NotEmpty(message = "Nome não pode ser vazio.")
@get:Length(min = 3, max = 200, message = "Nome deve conter entre 3 e 200 caracteres.")
val nome: String = "",
@get:NotEmpty(message = "Email não pode ser vazio.")
@get:Length(min = 5, max = 200, message = "Email deve conter entre 5 e 200 caracteres.")
@get:Email(message="Email inválido.")
val email: String = "",
@get:NotEmpty(message = "Senha não pode ser vazia.")
val senha: String = "",
@get:NotEmpty(message = "CPF não pode ser vazio.")
@get:CPF(message="CPF inválido")
val cpf: String = "",
@get:NotEmpty(message = "CNPJ não pode ser vazio.")
@get:CNPJ(message="CNPJ inválido.")
val cnpj: String = "",
val empresaId: String = "",
val valorHora: String? = null,
val qtdHorasTrabalhoDia: String? = null,
val qtdHorasAlmoco: String? = null,
val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.dtos
import org.hibernate.validator.constraints.Email
import org.hibernate.validator.constraints.Length
import org.hibernate.validator.constraints.NotEmpty
import org.hibernate.validator.constraints.br.CNPJ
import org.hibernate.validator.constraints.br.CPF
data class CadastroPJDto (
@get:NotEmpty(message = "Nome não pode ser vazio.")
@get:Length(min = 3, max = 200, message = "Nome deve conter entre 3 e 200 caracteres.")
val nome: String = "",
@get:NotEmpty(message = "Email não pode ser vazio.")
@get:Length(min = 5, max = 200, message = "Email deve conter entre 5 e 200 caracteres.")
@get:Email(message="Email inválido.")
val email: String = "",
@get:NotEmpty(message = "Senha não pode ser vazia.")
val senha: String = "",
@get:NotEmpty(message = "CPF não pode ser vazio.")
@get:CPF(message="CPF inválido")
val cpf: String = "",
@get:NotEmpty(message = "CNPJ não pode ser vazio.")
@get:CNPJ(message="CNPJ inválido.")
val cnpj: String = "",
@get:NotEmpty(message = "Razão social não pode ser vazio.")
@get:Length(min = 5, max = 200, message = "Razão social deve conter entre 5 e 200 caracteres.")
val razaoSocial: String = "",
val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.dtos
data class EmpresaDto (
val razaoSocial: String,
val cnpj: String,
val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.dtos
import org.hibernate.validator.constraints.Email
import org.hibernate.validator.constraints.Length
import org.hibernate.validator.constraints.NotEmpty
data class FuncionarioDto (
@get:NotEmpty(message = "Nome não pode ser vazio.")
@get:Length(min = 3, max = 200, message = "Nome deve conter entre 3 e 200 caracteres.")
val nome: String = "",
@get:NotEmpty(message = "Email não pode ser vazio.")
@get:Length(min = 5, max = 200, message = "Email deve conter entre 5 e 200 caracteres.")
@get:Email(message="Email inválido.")
val email: String = "",
val senha: String? = null,
val valorHora: String? = null,
val qtdHorasTrabalhoDia: String? = null,
val qtdHorasAlmoco: String? = null,
val id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.dtos
import org.hibernate.validator.constraints.NotEmpty
data class LancamentoDto (
@get:NotEmpty(message = "Data não pode ser vazia.")
val data: String? = null,
@get:NotEmpty(message = "Tipo não pode ser vazio.")
val tipo: String? = null,
val descricao: String? = null,
val localizacao: String? = null,
val funcionarioId: String? = null,
var id: String? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.enums
enum class PerfilEnum {
ROLE_ADMIN,
ROLE_USUARIO
}
package com.kazale.pontointeligente.api.pontointeligenteapi.enums
enum class TipoEnum {
INICIO_TRABALHO,
TERMINO_TRABALHO,
INICIO_ALMOCO,
TERMINO_ALMOCO,
INICIO_PAUSA,
TERMINO_PAUSA
}
package com.kazale.pontointeligente.api.pontointeligenteapi
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
@SpringBootApplication
class PontoInteligenteApiApplication {
}
fun main(args: Array<String>) {
SpringApplication.run(PontoInteligenteApiApplication::class.java, *args)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.repositories
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
import org.springframework.data.mongodb.repository.MongoRepository
interface EmpresaRepository: MongoRepository<Empresa, String> {
fun findByCnpj(cnpj: String): Empresa
}
package com.kazale.pontointeligente.api.pontointeligenteapi.repositories
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import org.springframework.data.mongodb.repository.MongoRepository
interface FuncionarioRepository: MongoRepository<Funcionario, String> {
fun findByCpf(cpf: String): Funcionario
fun findByEmail(email: String): Funcionario
}
package com.kazale.pontointeligente.api.pontointeligenteapi.repositories
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Lancamento
import org.springframework.data.domain.Page
import org.springframework.data.domain.Pageable
import org.springframework.data.mongodb.repository.MongoRepository
interface LancamentoRepository: MongoRepository<Lancamento, String> {
fun findByFuncionarioId(funcionarioId: String, pageable: Pageable): Page<Lancamento>
}
package com.kazale.pontointeligente.api.pontointeligenteapi.response
data class Response<T> (
val erros: ArrayList<String> = arrayListOf(),
var data: T? = null
)
package com.kazale.pontointeligente.api.pontointeligenteapi.security
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import org.springframework.security.core.userdetails.UserDetails
import org.springframework.security.core.userdetails.UserDetailsService
import org.springframework.security.core.userdetails.UsernameNotFoundException
import org.springframework.stereotype.Service
@Service
class FuncionarioDetailsService(val funcionarioService: FuncionarioService) : UserDetailsService {
override fun loadUserByUsername(username: String?): UserDetails {
if (username != null) {
val funcionario: Funcionario? = funcionarioService.buscarPorEmail(username)
if (funcionario != null) {
return FuncionarioPrincipal(funcionario)
}
}
throw UsernameNotFoundException(username)
}
}
package com.kazale.pontointeligente.api.pontointeligenteapi.security
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import org.springframework.security.core.GrantedAuthority
import org.springframework.security.core.authority.SimpleGrantedAuthority
import org.springframework.security.core.userdetails.UserDetails
class FuncionarioPrincipal(val funcionario: Funcionario) : UserDetails {
override fun getAuthorities(): MutableCollection<out GrantedAuthority> {
val authorities: MutableCollection<GrantedAuthority> = mutableListOf<GrantedAuthority>()
authorities.add(SimpleGrantedAuthority(funcionario.perfil.toString()))
return authorities
}
override fun isEnabled(): Boolean = true
override fun getUsername(): String = funcionario.email
override fun isCredentialsNonExpired(): Boolean = true
override fun getPassword(): String = funcionario.senha
override fun isAccountNonExpired(): Boolean = true
override fun isAccountNonLocked(): Boolean = true
}
package com.kazale.pontointeligente.api.pontointeligenteapi.security
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
import org.springframework.security.authentication.dao.DaoAuthenticationProvider
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
import org.springframework.security.config.http.SessionCreationPolicy
import org.springframework.security.crypto.password.PasswordEncoder
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
class SecurityConfig(
val funcionarioDetailsService: FuncionarioDetailsService) : WebSecurityConfigurerAdapter() {
override fun configure(auth: AuthenticationManagerBuilder?) {
auth?.authenticationProvider(authenticationProvider())
}
override fun configure(http: HttpSecurity?) {
http?.authorizeRequests()?.
anyRequest()?.
authenticated()?.and()?.
httpBasic()?.and()?.
sessionManagement()?.
sessionCreationPolicy(SessionCreationPolicy.STATELESS)?.and()?.
csrf()?.disable()
}
@Bean
fun authenticationProvider(): DaoAuthenticationProvider {
val authProvider = DaoAuthenticationProvider()
authProvider.setUserDetailsService(funcionarioDetailsService)
authProvider.setPasswordEncoder(encoder())
return authProvider
}
@Bean
fun encoder(): PasswordEncoder = BCryptPasswordEncoder()
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
interface EmpresaService {
fun buscarPorCnpj(cnpj: String): Empresa?
fun persistir(empresa: Empresa): Empresa
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
interface FuncionarioService {
fun persistir(funcionario: Funcionario): Funcionario
fun buscarPorCpf(cpf: String): Funcionario?
fun buscarPorEmail(email: String): Funcionario?
fun buscarPorId(id: String): Funcionario?
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services.impl
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
import com.kazale.pontointeligente.api.pontointeligenteapi.repositories.EmpresaRepository
import com.kazale.pontointeligente.api.pontointeligenteapi.services.EmpresaService
import org.springframework.stereotype.Service
@Service
class EmpresaServiceImpl (val empresaRepository: EmpresaRepository) : EmpresaService {
override fun buscarPorCnpj(cnpj: String) = empresaRepository.findByCnpj(cnpj)
override fun persistir(empresa: Empresa) = empresaRepository.save(empresa)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services.impl
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.repositories.FuncionarioRepository
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import org.springframework.stereotype.Service
@Service
class FuncionarioServiceImpl (val funcionarioRepository: FuncionarioRepository) : FuncionarioService {
override fun persistir(funcionario: Funcionario) = funcionarioRepository.save(funcionario)
override fun buscarPorCpf(cpf: String) = funcionarioRepository.findByCpf(cpf)
override fun buscarPorEmail(email: String) = funcionarioRepository.findByEmail(email)
override fun buscarPorId(id: String) = funcionarioRepository.findOne(id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services.impl
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Lancamento
import com.kazale.pontointeligente.api.pontointeligenteapi.repositories.LancamentoRepository
import com.kazale.pontointeligente.api.pontointeligenteapi.services.LancamentoService
import org.springframework.data.domain.PageRequest
import org.springframework.stereotype.Service
@Service
class LancamentoServiceImpl (val lancamentoRepository: LancamentoRepository) : LancamentoService {
override fun buscarPorFuncionarioId(funcionarioId: String, pageRequest: PageRequest) =
lancamentoRepository.findByFuncionarioId(funcionarioId, pageRequest)
override fun buscarPorId(id: String) = lancamentoRepository.findOne(id)
override fun persistir(lancamento: Lancamento) = lancamentoRepository.save(lancamento)
override fun remover(id: String) = lancamentoRepository.delete(id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Lancamento
import org.springframework.data.domain.Page
import org.springframework.data.domain.PageRequest
interface LancamentoService {
fun buscarPorFuncionarioId(funcionarioId: String, pageRequest: PageRequest): Page<Lancamento>
fun buscarPorId(id: String): Lancamento?
fun persistir(lancamento: Lancamento): Lancamento
fun remover(id: String)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.utils
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
class SenhaUtils {
fun gerarBCrypt(senha: String): String = BCryptPasswordEncoder().encode(senha)
}
spring.data.mongodb.database=kotlin
spring.data.mongodb.port=0
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration
spring.data.mongodb.uri= mongodb://localhost/kotlin
paginacao.qtd_por_pagina=25
package com.kazale.pontointeligente.api.pontointeligenteapi.controllers
import com.fasterxml.jackson.core.JsonProcessingException
import com.fasterxml.jackson.databind.ObjectMapper
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Lancamento
import com.kazale.pontointeligente.api.pontointeligenteapi.dtos.LancamentoDto
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.PerfilEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.TipoEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.services.FuncionarioService
import com.kazale.pontointeligente.api.pontointeligenteapi.services.LancamentoService
import com.kazale.pontointeligente.api.pontointeligenteapi.utils.SenhaUtils
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.BDDMockito
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.http.MediaType
import org.springframework.security.test.context.support.WithMockUser
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.junit4.SpringRunner
import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
import java.text.SimpleDateFormat
import java.util.*
@RunWith(SpringRunner::class)
@SpringBootTest
@AutoConfigureMockMvc
@ActiveProfiles("test")
@AutoConfigureDataMongo
class LancamentoControllerTest {
@Autowired
private val mvc: MockMvc? = null
@MockBean
private val lancamentoService: LancamentoService? = null
@MockBean
private val funcionarioService: FuncionarioService? = null
private val urlBase: String = "/api/lancamentos/"
private val idFuncionario: String = "1"
private val idLancamento: String = "1"
private val tipo: String = TipoEnum.INICIO_TRABALHO.name
private val data: Date = Date()
private val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
@Test
@WithMockUser
@Throws(Exception::class)
fun testCadastrarLancamento() {
val lancamento: Lancamento = obterDadosLancamento()
BDDMockito.given<Funcionario>(funcionarioService?.buscarPorId(idFuncionario))
.willReturn(funcionario())
BDDMockito.given(lancamentoService?.persistir(obterDadosLancamento()))
.willReturn(lancamento)
mvc!!.perform(MockMvcRequestBuilders.post(urlBase)
.content(obterJsonRequisicaoPost())
.contentType(MediaType.APPLICATION_JSON)
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.tipo").value(tipo))
.andExpect(jsonPath("$.data.data").value(dateFormat.format(data)))
.andExpect(jsonPath("$.data.funcionarioId").value(idFuncionario))
.andExpect(jsonPath("$.erros").isEmpty())
}
@Test
@WithMockUser
@Throws(Exception::class)
fun testCadastrarLancamentoFuncionarioIdInvalido() {
BDDMockito.given<Funcionario>(funcionarioService?.buscarPorId(idFuncionario))
.willReturn(null)
mvc!!.perform(MockMvcRequestBuilders.post(urlBase)
.content(obterJsonRequisicaoPost())
.contentType(MediaType.APPLICATION_JSON)
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest())
.andExpect(jsonPath("$.erros").value("Funcionário não encontrado. ID inexistente."))
.andExpect(jsonPath("$.data").isEmpty())
}
@Test
@WithMockUser(username = "admin@admin.com", roles = arrayOf("ADMIN"))
@Throws(Exception::class)
fun testRemoverLancamento() {
BDDMockito.given<Lancamento>(lancamentoService?.buscarPorId(idLancamento))
.willReturn(obterDadosLancamento())
mvc!!.perform(MockMvcRequestBuilders.delete(urlBase + idLancamento)
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
}
@Test
@WithMockUser
@Throws(Exception::class)
fun testRemoverLancamentoAcessoNegado() {
BDDMockito.given<Lancamento>(lancamentoService?.buscarPorId(idLancamento))
.willReturn(obterDadosLancamento())
mvc!!.perform(MockMvcRequestBuilders.delete(urlBase + idLancamento)
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isForbidden())
}
@Throws(JsonProcessingException::class)
private fun obterJsonRequisicaoPost(): String {
val lancamentoDto: LancamentoDto = LancamentoDto(
dateFormat.format(data), tipo, "Descrição",
"1.234,4.234", idFuncionario)
val mapper = ObjectMapper()
return mapper.writeValueAsString(lancamentoDto)
}
private fun obterDadosLancamento(): Lancamento =
Lancamento(data, TipoEnum.valueOf(tipo), idFuncionario,
"Descrição", "1.243,4.345", idLancamento)
private fun funcionario(): Funcionario =
Funcionario("Nome", "email@email.com", SenhaUtils().gerarBCrypt("123456"),
"23145699876", PerfilEnum.ROLE_USUARIO, idFuncionario)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Empresa
import com.kazale.pontointeligente.api.pontointeligenteapi.repositories.EmpresaRepository
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.BDDMockito
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
@SpringBootTest
@ActiveProfiles("test")
@AutoConfigureDataMongo
class EmpresaServiceTest {
@Autowired
val empresaService: EmpresaService? = null
@MockBean
private val empresaRepository: EmpresaRepository? = null
private val CNPJ = "51463645000100"
@Before
@Throws(Exception::class)
fun setUp() {
BDDMockito.given(empresaRepository?.findByCnpj(CNPJ)).willReturn(empresa())
BDDMockito.given(empresaRepository?.save(empresa())).willReturn(empresa())
}
@Test
fun testBuscarEmpresaPorCnpj() {
val empresa: Empresa? = empresaService?.buscarPorCnpj(CNPJ)
Assert.assertNotNull(empresa)
}
@Test
fun testPersistirEmpresa() {
val empresa: Empresa? = empresaService?.persistir(empresa())
Assert.assertNotNull(empresa)
}
private fun empresa(): Empresa = Empresa("Razão Social", CNPJ, "1")
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Funcionario
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.PerfilEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.repositories.FuncionarioRepository
import com.kazale.pontointeligente.api.pontointeligenteapi.utils.SenhaUtils
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.BDDMockito
import org.mockito.Mockito
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
@SpringBootTest
@ActiveProfiles("test")
@AutoConfigureDataMongo
class FuncionarioServiceTest {
@MockBean
private val funcionarioRepository: FuncionarioRepository? = null
@Autowired
private val funcionarioService: FuncionarioService? = null
private val email: String = "email@email.com"
private val cpf: String = "34234855948"
private val id: String = "1"
@Before
@Throws(Exception::class)
fun setUp() {
BDDMockito.given(funcionarioRepository?.save(Mockito.any(Funcionario::class.java)))
.willReturn(funcionario())
BDDMockito.given(funcionarioRepository?.findOne(id)).willReturn(funcionario())
BDDMockito.given(funcionarioRepository?.findByEmail(email)).willReturn(funcionario())
BDDMockito.given(funcionarioRepository?.findByCpf(cpf)).willReturn(funcionario())
}
@Test
fun testPersistirFuncionario() {
val funcionario: Funcionario? = this.funcionarioService?.persistir(funcionario())
Assert.assertNotNull(funcionario)
}
@Test
fun testBuscarFuncionarioPorId() {
val funcionario: Funcionario? = this.funcionarioService?.buscarPorId(id)
Assert.assertNotNull(funcionario)
}
@Test
fun testBuscarFuncionarioPorEmail() {
val funcionario: Funcionario? = this.funcionarioService?.buscarPorEmail(email)
Assert.assertNotNull(funcionario)
}
@Test
fun testBuscarFuncionarioPorCpf() {
val funcionario: Funcionario? = this.funcionarioService?.buscarPorCpf(cpf)
Assert.assertNotNull(funcionario)
}
private fun funcionario(): Funcionario =
Funcionario("Nome", email, SenhaUtils().gerarBCrypt("123456"),
cpf, PerfilEnum.ROLE_USUARIO, id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.services
import com.kazale.pontointeligente.api.pontointeligenteapi.documents.Lancamento
import com.kazale.pontointeligente.api.pontointeligenteapi.enums.TipoEnum
import com.kazale.pontointeligente.api.pontointeligenteapi.repositories.LancamentoRepository
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.BDDMockito
import org.mockito.Mockito
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.data.mongo.AutoConfigureDataMongo
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.mock.mockito.MockBean
import org.springframework.data.domain.Page
import org.springframework.data.domain.PageImpl
import org.springframework.data.domain.PageRequest
import org.springframework.test.context.ActiveProfiles
import org.springframework.test.context.junit4.SpringRunner
import java.util.*
@RunWith(SpringRunner::class)
@SpringBootTest
@ActiveProfiles("test")
@AutoConfigureDataMongo
class LancamentoServiceTest {
@MockBean
private val lancamentoRepository: LancamentoRepository? = null
@Autowired
private val lancamentoService: LancamentoService? = null
private val id: String = "1"
@Before
@Throws(Exception::class)
fun setUp() {
BDDMockito
.given<Page<Lancamento>>(lancamentoRepository?.findByFuncionarioId(id, PageRequest(0, 10)))
.willReturn(PageImpl(ArrayList<Lancamento>()))
BDDMockito.given(lancamentoRepository?.findOne("1")).willReturn(lancamento())
BDDMockito.given(lancamentoRepository?.save(Mockito.any(Lancamento::class.java)))
.willReturn(lancamento())
}
@Test
fun testBuscarLancamentoPorFuncionarioId() {
val lancamento: Page<Lancamento>? = lancamentoService?.buscarPorFuncionarioId(id, PageRequest(0, 10))
Assert.assertNotNull(lancamento)
}
@Test
fun testBuscarLancamentoPorId() {
val lancamento: Lancamento? = lancamentoService?.buscarPorId(id)
Assert.assertNotNull(lancamento)
}
@Test
fun testPersistirLancamento() {
val lancamento: Lancamento? = lancamentoService?.persistir(lancamento())
Assert.assertNotNull(lancamento)
}
private fun lancamento(): Lancamento = Lancamento(Date(), TipoEnum.INICIO_TRABALHO, id)
}
package com.kazale.pontointeligente.api.pontointeligenteapi.utils
import org.junit.Assert
import org.junit.Test
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
class SenhaUtilsTest {
private val SENHA = "123456"
private val bCryptEncoder = BCryptPasswordEncoder()
@Test
fun testGerarHashSenha() {
val hash = SenhaUtils().gerarBCrypt(SENHA)
Assert.assertTrue(bCryptEncoder.matches(SENHA, hash))
println(SENHA)
println(hash)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment