인프런 커뮤니티 질문&답변

qkrals2475님의 프로필 이미지
qkrals2475

작성한 질문수

Spring Boot JWT Tutorial

DTO, Repository, 로그인

토큰반환이 안되는거같아요

해결된 질문

작성

·

521

0

회원가입 까지는 db에 값이 잘 들어갔는데 그 정보로 포스트맨을 통해 로그인하려고 하면 아무런 에러없이 토큰도 반환해주지 않는데 어떻게 해결하나요 ㅜ

 

"C:\Program Files\Java\jdk-17\bin\java.exe" -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.3\lib\idea_rt.jar=60002:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\qkral\Desktop\GoJiSik_BE\out\production\classes;C:\Users\qkral\Desktop\GoJiSik_BE\out\production\resources;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.projectlombok\lombok\1.18.28\a2ff5da8bcd8b1b26f36b806ced63213362c6dcc\lombok-1.18.28.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-data-jpa\3.1.2\a37d54373b11d2de70dfb8bcd6612dc63787f4a8\spring-boot-starter-data-jpa-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-security\3.1.2\f51204b86f626c2a7f0d41f88e8e3bd86091dd1d\spring-boot-starter-security-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-validation\3.1.2\1e2f4bdd1913af954d3a929e692807cb3a19b0b4\spring-boot-starter-validation-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-web\3.1.2\30b824817e764a5a5a1e9fb46e7ace40bcfa3185\spring-boot-starter-web-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.h2database\h2\2.1.214\d5c2005c9e3279201e12d4776c948578b16bf8b2\h2-2.1.214.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.jsonwebtoken\jjwt-api\0.11.5\f742940045619d06383e7df37b21ac422b476cf1\jjwt-api-0.11.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-aop\3.1.2\e882bf8c8853807a8e69cce9465ec12233fb5437\spring-boot-starter-aop-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-jdbc\3.1.2\e864f6a34d620e7e698c115881ea23b08f7125e9\spring-boot-starter-jdbc-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.hibernate.orm\hibernate-core\6.2.6.Final\9c4586a4a2dc721439ee454d5c858c1235b6ecba\hibernate-core-6.2.6.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-jpa\3.1.2\e9507688bc27006a5fb9ae4d13c1a5685354eb4a\spring-data-jpa-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aspects\6.0.11\7b6fcc5d4f06c36c332b7a122dca863163a127d4\spring-aspects-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter\3.1.2\c09a48df6fbc2b07b7aef1256b45260a3478b49f\spring-boot-starter-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-config\6.1.2\f6391123f7c3cb7a158266fc81cc4c82c5c4fe19\spring-security-config-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-web\6.1.2\c1f133de05e895e58b34461f6b1189a8d6a0d56a\spring-security-web-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\6.0.11\15b85c825558fadb85e3c77779d7225ce7e4a7bc\spring-aop-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-el\10.1.11\97aa65b1f036f722e869f582f8d607d01508d420\tomcat-embed-el-10.1.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.hibernate.validator\hibernate-validator\8.0.1.Final\e49e116b3d3928060599b176b3538bb848718e95\hibernate-validator-8.0.1.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-json\3.1.2\c48d521879dbbcebe1a99f47257612968e022f5b\spring-boot-starter-json-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-webmvc\6.0.11\892b4a63b5d930c2c43058c6db0c2c65401fb078\spring-webmvc-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-tomcat\3.1.2\2e7284f8ecf2989e1a6ffc7faf964eccb309bfd4\spring-boot-starter-tomcat-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-web\6.0.11\c32a7bf6b88b83bac6aa63866fcf208892640446\spring-web-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.aspectj\aspectjweaver\1.9.19\afbffb1210239fbba5cad73093c5b216d515838f\aspectjweaver-1.9.19.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.zaxxer\HikariCP\5.0.1\a74c7f0a37046846e88d54f7cb6ea6d565c65f9c\HikariCP-5.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jdbc\6.0.11\dc495b5cb8052f044fd29aa68bb2231b1895b8f4\spring-jdbc-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.persistence\jakarta.persistence-api\3.1.0\66901fa1c373c6aff65c13791cc11da72060a8d6\jakarta.persistence-api-3.1.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.transaction\jakarta.transaction-api\2.0.1\51a520e3fae406abb84e2e1148e6746ce3f80a1a\jakarta.transaction-api-2.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\6.0.11\a7b10f3d3c1492bfc4e6d7c966cd2e21f4d441f5\spring-context-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-orm\6.0.11\dde0c5f956052c8c3865e95202dd35b7437b2c6f\spring-orm-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.data\spring-data-commons\3.1.2\cf75c8a2a11d24df5bdb4d796d4b449bab3bed07\spring-data-commons-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-tx\6.0.11\59cd03d2ba6968ade8c192b4d6488efb48ec36f\spring-tx-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\6.0.11\8513efc6e94b407b5cd85f69eeec511f1ef34164\spring-beans-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-core\6.0.11\87834b5cf95c6fa28f5bdf8a85e0daf0bff918a8\spring-core-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.antlr\antlr4-runtime\4.10.1\10839f875928f59c622d675091d51a43ea0dc5f7\antlr4-runtime-4.10.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.annotation\jakarta.annotation-api\2.1.1\48b9bda22b091b1f48b13af03fe36db3be6e1ae3\jakarta.annotation-api-2.1.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\2.0.7\41eb7184ea9d556f23e18b5cb99cad1f8581fc00\slf4j-api-2.0.7.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-autoconfigure\3.1.2\ea294976f925441fc1d5a5414d5d31717f06aa3c\spring-boot-autoconfigure-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot\3.1.2\3cf070561716277ec91ebadc07362dd0b4a9f63f\spring-boot-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.boot\spring-boot-starter-logging\3.1.2\4e47bd132fdd0d60ad57d70bdc99198b182166ee\spring-boot-starter-logging-3.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.33\2cd0a87ff7df953f810c344bdf2fe3340b954c69\snakeyaml-1.33.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-core\6.1.2\acd42f051b0f38d043ad807ca542f1f53bfa2fe\spring-security-core-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-expression\6.0.11\1d0940120a275719c3988c592068f4acf807fe59\spring-expression-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.validation\jakarta.validation-api\3.0.2\92b6631659ba35ca09e44874d3eb936edfeee532\jakarta.validation-api-3.0.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.jboss.logging\jboss-logging\3.5.3.Final\c88fc1d8a96d4c3491f55d4317458ccad53ca663\jboss-logging-3.5.3.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml\classmate\1.5.1\3fe0bed568c62df5e89f4f174c101eab25345b6c\classmate-1.5.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jsr310\2.15.2\30d16ec2aef6d8094c5e2dce1d95034ca8b6cb42\jackson-datatype-jsr310-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.module\jackson-module-parameter-names\2.15.2\75f8d2788db20f6c587c7a19e94fb6248c314241\jackson-module-parameter-names-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.datatype\jackson-datatype-jdk8\2.15.2\66a50e089cfd2f93896b9b6f7a734cea7bcf2f31\jackson-datatype-jdk8-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.15.2\9353b021f10c307c00328f52090de2bdb4b6ff9c\jackson-databind-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-websocket\10.1.11\ac9ecc8a2b6a2cd8123554259faabc2e7b4aa013\tomcat-embed-websocket-10.1.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.tomcat.embed\tomcat-embed-core\10.1.11\9d1ba230cbe0dfb410b0beba102eff20e14793a1\tomcat-embed-core-10.1.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-observation\1.11.2\704e145c4801320b4c7abf6c1a5b000155b069db\micrometer-observation-1.11.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework\spring-jcl\6.0.11\c9b16cdb6d4874ba4118fcdd4b0335f6278b378\spring-jcl-6.0.11.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-classic\1.4.8\f00ba91d993e4d14301b11968d3cacc3be7ef3e1\logback-classic-1.4.8.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-to-slf4j\2.20.0\d37f81f8978e2672bc32c82712ab4b3f66624adc\log4j-to-slf4j-2.20.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.slf4j\jul-to-slf4j\2.0.7\a48f44aeaa8a5ddc347007298a28173ac1fbbd8b\jul-to-slf4j-2.0.7.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.springframework.security\spring-security-crypto\6.1.2\3acab1c7979cc9d44d5e12e7f5acd4d9552e6b83\spring-security-crypto-6.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.15.2\4724a65ac8e8d156a24898d50fd5dbd3642870b8\jackson-annotations-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.15.2\a6fe1836469a69b3ff66037c324d75fc66ef137c\jackson-core-2.15.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.micrometer\micrometer-commons\1.11.2\f03f87bd7eacf79b00aa89907c6e30e0ec86b4\micrometer-commons-1.11.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\ch.qos.logback\logback-core\1.4.8\3fba9c105e0efc5ffdcda701379687917d5286f7\logback-core-1.4.8.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.20.0\1fe6082e660daf07c689a89c94dc0f49c26b44bb\log4j-api-2.20.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.jsonwebtoken\jjwt-impl\0.11.5\40a599f0e8a8e4e0701596fbb15e67bfda64fdf0\jjwt-impl-0.11.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.jsonwebtoken\jjwt-jackson\0.11.5\3b83a06809e98a69402d7333dcf67df6f6ea4579\jjwt-jackson-0.11.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.hibernate.common\hibernate-commons-annotations\6.0.6.Final\77a5f94b56d49508e0ee334751db5b78e5ccd50c\hibernate-commons-annotations-6.0.6.Final.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\io.smallrye\jandex\3.0.5\c548a4871b552292dbdd65409d3fda145c8925c1\jandex-3.0.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy\1.14.5\28a424c0c4f362568e904d992c239c996cf7adc7\byte-buddy-1.14.5.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-runtime\4.0.3\93af25be25b2c92c83e0ce61cb8b3ed23568f316\jaxb-runtime-4.0.3.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.xml.bind\jakarta.xml.bind-api\4.0.0\bbb399208d288b15ec101fa4fcfc4bd77cedc97a\jakarta.xml.bind-api-4.0.0.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.inject\jakarta.inject-api\2.0.1\4c28afe1991a941d7702fe1362c365f0a8641d1e\jakarta.inject-api-2.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\jaxb-core\4.0.3\e9093b4a82069a1d78ee9a3233ca387bca88861f\jaxb-core-4.0.3.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\jakarta.activation\jakarta.activation-api\2.1.2\640c0d5aff45dbff1e1a1bc09673ff3a02b1ba12\jakarta.activation-api-2.1.2.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.eclipse.angus\angus-activation\2.0.1\eaafaf4eb71b400e4136fc3a286f50e34a68ecb7\angus-activation-2.0.1.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\org.glassfish.jaxb\txw2\4.0.3\47b8fe31c6d1a3382203af919400527389e01e9c\txw2-4.0.3.jar;C:\Users\qkral\.gradle\caches\modules-2\files-2.1\com.sun.istack\istack-commons-runtime\4.1.2\18ec117c85f3ba0ac65409136afa8e42bc74e739\istack-commons-runtime-4.1.2.jar com.likelion.nsu.gojisik.GojisikApplication

. ____ _

/\\ / ___'_ __ (_)_ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/ ___)| |_)| | | | | || (_| | ) ) ) )

' |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

:: Spring Boot :: (v3.1.2)

2023-08-14T05:24:36.414+09:00 INFO 18164 --- [ main] c.l.nsu.gojisik.GojisikApplication : Starting GojisikApplication using Java 17.0.6 with PID 18164 (C:\Users\qkral\Desktop\GoJiSik_BE\out\production\classes started by qkral in C:\Users\qkral\Desktop\GoJiSik_BE)

2023-08-14T05:24:36.417+09:00 INFO 18164 --- [ main] c.l.nsu.gojisik.GojisikApplication : No active profile set, falling back to 1 default profile: "default"

2023-08-14T05:24:37.478+09:00 INFO 18164 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.

2023-08-14T05:24:37.579+09:00 INFO 18164 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 89 ms. Found 2 JPA repository interfaces.

2023-08-14T05:24:38.352+09:00 INFO 18164 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8081 (http)

2023-08-14T05:24:38.367+09:00 INFO 18164 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2023-08-14T05:24:38.367+09:00 INFO 18164 --- [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.11]

2023-08-14T05:24:38.521+09:00 INFO 18164 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2023-08-14T05:24:38.522+09:00 INFO 18164 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2049 ms

2023-08-14T05:24:38.574+09:00 INFO 18164 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...

2023-08-14T05:24:38.669+09:00 INFO 18164 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn0: url=jdbc:h2:tcp://localhost/~/GoJiSik_BE1 user=SA

2023-08-14T05:24:38.671+09:00 INFO 18164 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.

2023-08-14T05:24:38.682+09:00 INFO 18164 --- [ main] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:tcp://localhost/~/GoJiSik_BE1'

2023-08-14T05:24:38.881+09:00 INFO 18164 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]

2023-08-14T05:24:38.958+09:00 INFO 18164 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.6.Final

2023-08-14T05:24:38.961+09:00 INFO 18164 --- [ main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer

2023-08-14T05:24:39.169+09:00 INFO 18164 --- [ main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy

2023-08-14T05:24:39.352+09:00 INFO 18164 --- [ main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer

2023-08-14T05:24:39.773+09:00 INFO 18164 --- [ main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy

2023-08-14T05:24:40.918+09:00 INFO 18164 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]

2023-08-14T05:24:40.950+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop table if exists answer cascade

Hibernate:

drop table if exists answer cascade

2023-08-14T05:24:40.953+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop table if exists authority cascade

Hibernate:

drop table if exists authority cascade

2023-08-14T05:24:40.954+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop table if exists file cascade

Hibernate:

drop table if exists file cascade

2023-08-14T05:24:40.955+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop table if exists member cascade

Hibernate:

drop table if exists member cascade

2023-08-14T05:24:40.955+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop table if exists question cascade

Hibernate:

drop table if exists question cascade

2023-08-14T05:24:40.956+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop table if exists user_authority cascade

Hibernate:

drop table if exists user_authority cascade

2023-08-14T05:24:40.957+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop sequence if exists answer_seq

Hibernate:

drop sequence if exists answer_seq

2023-08-14T05:24:40.957+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop sequence if exists file_seq

Hibernate:

drop sequence if exists file_seq

2023-08-14T05:24:40.957+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

drop sequence if exists question_seq

Hibernate:

drop sequence if exists question_seq

2023-08-14T05:24:40.963+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create sequence answer_seq start with 1 increment by 50

Hibernate:

create sequence answer_seq start with 1 increment by 50

2023-08-14T05:24:40.964+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create sequence file_seq start with 1 increment by 50

Hibernate:

create sequence file_seq start with 1 increment by 50

2023-08-14T05:24:40.964+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create sequence question_seq start with 1 increment by 50

Hibernate:

create sequence question_seq start with 1 increment by 50

2023-08-14T05:24:40.968+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create table answer (

is_adopted boolean,

created_date timestamp(6),

id bigint not null,

member_id bigint,

question_id bigint,

contents varchar(255),

primary key (id)

)

Hibernate:

create table answer (

is_adopted boolean,

created_date timestamp(6),

id bigint not null,

member_id bigint,

question_id bigint,

contents varchar(255),

primary key (id)

)

2023-08-14T05:24:40.969+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create table authority (

authority_name varchar(50) not null,

primary key (authority_name)

)

Hibernate:

create table authority (

authority_name varchar(50) not null,

primary key (authority_name)

)

2023-08-14T05:24:40.971+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create table file (

file_size bigint,

id bigint not null,

origin_file_name varchar(255),

saved_file_name varchar(255),

type varchar(255) check (type in ('Image','Audio')),

primary key (id)

)

Hibernate:

create table file (

file_size bigint,

id bigint not null,

origin_file_name varchar(255),

saved_file_name varchar(255),

type varchar(255) check (type in ('Image','Audio')),

primary key (id)

)

2023-08-14T05:24:40.973+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create table member (

activated boolean not null,

font integer not null,

grade tinyint check (grade between 0 and 2),

birthday timestamp(6),

member_id bigint generated by default as identity,

point bigint,

password varchar(255),

phone_number varchar(255),

username varchar(255),

primary key (member_id)

)

Hibernate:

create table member (

activated boolean not null,

font integer not null,

grade tinyint check (grade between 0 and 2),

birthday timestamp(6),

member_id bigint generated by default as identity,

point bigint,

password varchar(255),

phone_number varchar(255),

username varchar(255),

primary key (member_id)

)

2023-08-14T05:24:40.975+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create table question (

created_date timestamp(6),

file_id bigint unique,

hits bigint,

id bigint not null,

user_id bigint,

category varchar(255),

contents varchar(255),

title varchar(255),

primary key (id)

)

Hibernate:

create table question (

created_date timestamp(6),

file_id bigint unique,

hits bigint,

id bigint not null,

user_id bigint,

category varchar(255),

contents varchar(255),

title varchar(255),

primary key (id)

)

2023-08-14T05:24:40.978+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

create table user_authority (

member_id bigint not null,

authority_name varchar(50) not null,

primary key (member_id, authority_name)

)

Hibernate:

create table user_authority (

member_id bigint not null,

authority_name varchar(50) not null,

primary key (member_id, authority_name)

)

2023-08-14T05:24:40.981+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

alter table if exists answer

add constraint FKn2sp5pa6h0u2kixjl2r4vfluf

foreign key (member_id)

references member

Hibernate:

alter table if exists answer

add constraint FKn2sp5pa6h0u2kixjl2r4vfluf

foreign key (member_id)

references member

2023-08-14T05:24:40.982+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

alter table if exists answer

add constraint FK8frr4bcabmmeyyu60qt7iiblo

foreign key (question_id)

references question

Hibernate:

alter table if exists answer

add constraint FK8frr4bcabmmeyyu60qt7iiblo

foreign key (question_id)

references question

2023-08-14T05:24:40.983+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

alter table if exists question

add constraint FK6fsg3647bhqmogxrp2bqksnf3

foreign key (file_id)

references file

Hibernate:

alter table if exists question

add constraint FK6fsg3647bhqmogxrp2bqksnf3

foreign key (file_id)

references file

2023-08-14T05:24:40.985+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

alter table if exists question

add constraint FK1f5tvh6o6n30k5h6iqefshhu5

foreign key (user_id)

references member

Hibernate:

alter table if exists question

add constraint FK1f5tvh6o6n30k5h6iqefshhu5

foreign key (user_id)

references member

2023-08-14T05:24:40.986+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

alter table if exists user_authority

add constraint FK6ktglpl5mjosa283rvken2py5

foreign key (authority_name)

references authority

Hibernate:

alter table if exists user_authority

add constraint FK6ktglpl5mjosa283rvken2py5

foreign key (authority_name)

references authority

2023-08-14T05:24:40.989+09:00 DEBUG 18164 --- [ main] org.hibernate.SQL :

alter table if exists user_authority

add constraint FKb27h85xa52amfh4qk85mlxudl

foreign key (member_id)

references member

Hibernate:

alter table if exists user_authority

add constraint FKb27h85xa52amfh4qk85mlxudl

foreign key (member_id)

references member

2023-08-14T05:24:40.996+09:00 INFO 18164 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2023-08-14T05:24:41.596+09:00 WARN 18164 --- [ main] ocalVariableTableParameterNameDiscoverer : Using deprecated '-debug' fallback for parameter name resolution. Compile the affected code with '-parameters' instead or avoid its introspection: com.likelion.nsu.gojisik.repository.UserRepository

2023-08-14T05:24:41.845+09:00 WARN 18164 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

2023-08-14T05:24:42.025+09:00 INFO 18164 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@3fc7abf6, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@1016b44e, org.springframework.security.web.context.SecurityContextHolderFilter@565030b7, org.springframework.security.web.header.HeaderWriterFilter@43c3354, org.springframework.security.web.authentication.logout.LogoutFilter@6bbac73d, org.springframework.web.filter.CorsFilter@5e593b08, com.likelion.nsu.gojisik.security.JwtFilter@6c6c93f8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@2eb31735, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@73753326, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@38e88e13, org.springframework.security.web.session.SessionManagementFilter@750adad8, org.springframework.security.web.access.ExceptionTranslationFilter@2fafa9bf, org.springframework.security.web.access.intercept.AuthorizationFilter@7ec75228]

2023-08-14T05:24:42.643+09:00 INFO 18164 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8081 (http) with context path ''

2023-08-14T05:24:42.652+09:00 INFO 18164 --- [ main] c.l.nsu.gojisik.GojisikApplication : Started GojisikApplication in 6.984 seconds (process running for 7.725)

2023-08-14T05:24:56.675+09:00 INFO 18164 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'

2023-08-14T05:24:56.675+09:00 INFO 18164 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'

2023-08-14T05:24:56.677+09:00 INFO 18164 --- [nio-8081-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms

2023-08-14T05:24:57.142+09:00 DEBUG 18164 --- [nio-8081-exec-1] org.hibernate.SQL :

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

Hibernate:

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

2023-08-14T05:24:57.143+09:00 TRACE 18164 --- [nio-8081-exec-1] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]

2023-08-14T05:25:00.654+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL :

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

Hibernate:

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

2023-08-14T05:25:00.655+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]

2023-08-14T05:25:00.775+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL :

insert

into

member

(activated,birthday,font,grade,password,phone_number,point,username,member_id)

values

(?,?,?,?,?,?,?,?,default)

Hibernate:

insert

into

member

(activated,birthday,font,grade,password,phone_number,point,username,member_id)

values

(?,?,?,?,?,?,?,?,default)

2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [BOOLEAN] - [true]

2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [2] as [TIMESTAMP] - [null]

2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [3] as [INTEGER] - [0]

2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [4] as [TINYINT] - [null]

2023-08-14T05:25:00.790+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [5] as [VARCHAR] - [$2a$10$lXqx/USXvQtMk5U7tGg7.OIcNUGHOSRTGzpigXehAMAahzcYpcHJO]

2023-08-14T05:25:00.791+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [6] as [VARCHAR] - [01084912125]

2023-08-14T05:25:00.791+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [7] as [BIGINT] - [null]

2023-08-14T05:25:00.791+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [8] as [VARCHAR] - [null]

2023-08-14T05:25:00.824+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL :

insert

into

authority

(authority_name)

values

(?)

Hibernate:

insert

into

authority

(authority_name)

values

(?)

2023-08-14T05:25:00.825+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [ROLE_USER]

2023-08-14T05:25:00.830+09:00 DEBUG 18164 --- [nio-8081-exec-3] org.hibernate.SQL :

insert

into

user_authority

(member_id,authority_name)

values

(?,?)

Hibernate:

insert

into

user_authority

(member_id,authority_name)

values

(?,?)

2023-08-14T05:25:00.831+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [1] as [BIGINT] - [1]

2023-08-14T05:25:00.831+09:00 TRACE 18164 --- [nio-8081-exec-3] org.hibernate.orm.jdbc.bind : binding parameter [2] as [VARCHAR] - [ROLE_USER]

2023-08-14T05:25:04.414+09:00 DEBUG 18164 --- [nio-8081-exec-4] org.hibernate.SQL :

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

Hibernate:

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

2023-08-14T05:25:04.414+09:00 TRACE 18164 --- [nio-8081-exec-4] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]

2023-08-14T05:38:49.268+09:00 DEBUG 18164 --- [io-8081-exec-10] org.hibernate.SQL :

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

Hibernate:

select

m1_0.member_id,

m1_0.activated,

a1_0.member_id,

a1_1.authority_name,

m1_0.birthday,

m1_0.font,

m1_0.grade,

m1_0.password,

m1_0.phone_number,

m1_0.point,

m1_0.username

from

member m1_0

left join

(user_authority a1_0

join

authority a1_1

on a1_1.authority_name=a1_0.authority_name)

on m1_0.member_id=a1_0.member_id

where

m1_0.username=?

2023-08-14T05:38:49.269+09:00 TRACE 18164 --- [io-8081-exec-10] org.hibernate.orm.jdbc.bind : binding parameter [1] as [VARCHAR] - [01084912125]

 

답변 2

0

정은구님의 프로필 이미지
정은구
지식공유자

안녕하세요 🙂

Spring Boot 3.4.0 (SNAPSHOT) 버전에 맞춰 샘플 코드를 업데이트했습니다.

아래 링크에서 Java와 Kotlin 버전의 최신 샘플 코드를 확인하실 수 있으니 참고 부탁드립니다.

Javahttps://github.com/SilverNine/spring-boot-jwt-tutorial

Kotlinhttps://github.com/SilverNine/spring-boot-jwt-tutorial-kotlin

0

qkrals2475님의 프로필 이미지
qkrals2475
질문자

UsernamePasswordAuthenticationToken authenticationToken 이게 flase가 뜨는데 db에 있는데 아이디 비번이랑 같은 값으로 로그인 시도했는데 왜 flase가 뜨는지  모르겠습니다
qkrals2475님의 프로필 이미지
qkrals2475

작성한 질문수

질문하기