Commit d434ebaa51e14075e414c10b82ecf28edf905e02
1 parent
3e0aa26e
회원가입화면추가
Showing
21 changed files
with
416 additions
and
411 deletions
Show diff stats
log.config.path_IS_UNDEFINED/err_log.2022-03-29_0.log deleted
| 1 | -2022-03-29 11:08:41 [restartedMain] [ERROR] o.s.b.d.LoggingFailureAnalysisReporter - []: | |
| 2 | - | |
| 3 | -*************************** | |
| 4 | -APPLICATION FAILED TO START | |
| 5 | -*************************** | |
| 6 | - | |
| 7 | -Description: | |
| 8 | - | |
| 9 | -Field boardDao in com.daeucna.board.service.BoardService required a bean named 'sqlSession' that could not be found. | |
| 10 | - | |
| 11 | -The injection point has the following annotations: | |
| 12 | - - @org.springframework.beans.factory.annotation.Autowired(required=true) | |
| 13 | - | |
| 14 | - | |
| 15 | -Action: | |
| 16 | - | |
| 17 | -Consider defining a bean named 'sqlSession' in your configuration. | |
| 18 | - |
log.config.path_IS_UNDEFINED/err_log.log deleted
| 1 | -2022-03-30 10:35:05 [restartedMain] [ERROR] o.s.boot.SpringApplication - []:Application run failed | |
| 2 | -java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: | |
| 3 | -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. | |
| 4 | - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:328) | |
| 5 | - at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:282) | |
| 6 | - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:240) | |
| 7 | - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) | |
| 8 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) | |
| 9 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) | |
| 10 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) | |
| 11 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) | |
| 12 | - at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85) | |
| 13 | - at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66) | |
| 14 | - at java.util.ArrayList.forEach(ArrayList.java:1257) | |
| 15 | - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120) | |
| 16 | - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114) | |
| 17 | - at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65) | |
| 18 | - at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:339) | |
| 19 | - at org.springframework.boot.SpringApplication.run(SpringApplication.java:297) | |
| 20 | - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) | |
| 21 | - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) | |
| 22 | - at com.daeucna.board.BoardApplication.main(BoardApplication.java:12) | |
| 23 | - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
| 24 | - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
| 25 | - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
| 26 | - at java.lang.reflect.Method.invoke(Method.java:498) | |
| 27 | - at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) | |
| 28 | -Caused by: java.lang.IllegalStateException: Logback configuration error detected: | |
| 29 | -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. | |
| 30 | - at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179) | |
| 31 | - at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) | |
| 32 | - at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) | |
| 33 | - at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132) | |
| 34 | - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) | |
| 35 | - ... 23 common frames omitted |
log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.2022-03-29_0.log deleted
| 1 | -2022-03-29 11:08:40 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Starting BoardApplication using Java 1.8.0_202 on sangkiham_PC with PID 15708 (D:\Working\java\board\target\classes started by sangkiham in D:\Working\java\board) | |
| 2 | -2022-03-29 11:08:40 [restartedMain] [DEBUG] com.daeucna.board.BoardApplication - []:Running with Spring Boot v2.6.4, Spring v5.3.16 | |
| 3 | -2022-03-29 11:08:40 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "pom.xml" | |
| 4 | -2022-03-29 11:08:40 [restartedMain] [INFO ] o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - []:Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable | |
| 5 | -2022-03-29 11:08:40 [restartedMain] [INFO ] o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - []:For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' | |
| 6 | -2022-03-29 11:08:41 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. | |
| 7 | -2022-03-29 11:08:41 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 8 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8080 (http) | |
| 9 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8080"] | |
| 10 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] | |
| 11 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] | |
| 12 | -2022-03-29 11:08:41 [restartedMain] [INFO ] org.apache.jasper.servlet.TldScanner - []:At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. | |
| 13 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext | |
| 14 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 681 ms | |
| 15 | -2022-03-29 11:08:41 [restartedMain] [WARN ] o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - []:Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'boardController': Unsatisfied dependency expressed through field 'boardService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'boardService': Unsatisfied dependency expressed through field 'boardDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'boardDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sqlSession' available | |
| 16 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Stopping service [Tomcat] | |
| 17 | -2022-03-29 11:08:41 [restartedMain] [INFO ] o.s.b.a.l.ConditionEvaluationReportLoggingListener - []: | |
| 18 | - | |
| 19 | -Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. | |
| 20 | -2022-03-29 11:08:41 [restartedMain] [ERROR] o.s.b.d.LoggingFailureAnalysisReporter - []: | |
| 21 | - | |
| 22 | -*************************** | |
| 23 | -APPLICATION FAILED TO START | |
| 24 | -*************************** | |
| 25 | - | |
| 26 | -Description: | |
| 27 | - | |
| 28 | -Field boardDao in com.daeucna.board.service.BoardService required a bean named 'sqlSession' that could not be found. | |
| 29 | - | |
| 30 | -The injection point has the following annotations: | |
| 31 | - - @org.springframework.beans.factory.annotation.Autowired(required=true) | |
| 32 | - | |
| 33 | - | |
| 34 | -Action: | |
| 35 | - | |
| 36 | -Consider defining a bean named 'sqlSession' in your configuration. | |
| 37 | - |
log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.log deleted
| 1 | -2022-03-30 10:35:05 [restartedMain] [ERROR] o.s.boot.SpringApplication - []:Application run failed | |
| 2 | -java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: | |
| 3 | -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. | |
| 4 | - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:328) | |
| 5 | - at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:282) | |
| 6 | - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:240) | |
| 7 | - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) | |
| 8 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) | |
| 9 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) | |
| 10 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) | |
| 11 | - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) | |
| 12 | - at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85) | |
| 13 | - at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66) | |
| 14 | - at java.util.ArrayList.forEach(ArrayList.java:1257) | |
| 15 | - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120) | |
| 16 | - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114) | |
| 17 | - at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65) | |
| 18 | - at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:339) | |
| 19 | - at org.springframework.boot.SpringApplication.run(SpringApplication.java:297) | |
| 20 | - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) | |
| 21 | - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) | |
| 22 | - at com.daeucna.board.BoardApplication.main(BoardApplication.java:12) | |
| 23 | - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
| 24 | - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
| 25 | - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
| 26 | - at java.lang.reflect.Method.invoke(Method.java:498) | |
| 27 | - at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) | |
| 28 | -Caused by: java.lang.IllegalStateException: Logback configuration error detected: | |
| 29 | -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. | |
| 30 | - at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179) | |
| 31 | - at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) | |
| 32 | - at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) | |
| 33 | - at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132) | |
| 34 | - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) | |
| 35 | - ... 23 common frames omitted | |
| 36 | -2022-03-30 10:41:00 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 37 | -2022-03-30 10:41:37 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. | |
| 38 | -2022-03-30 10:41:37 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 39 | -2022-03-30 10:42:33 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 40 | -2022-03-30 10:42:51 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. | |
| 41 | -2022-03-30 10:42:51 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 42 | -2022-03-30 10:43:58 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Starting BoardApplication using Java 1.8.0_202 on sangkiham_PC with PID 13128 (D:\Working\java\board\target\classes started by sangkiham in D:\Working\java\board) | |
| 43 | -2022-03-30 10:43:58 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "run" | |
| 44 | -2022-03-30 10:43:59 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 45 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) | |
| 46 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] | |
| 47 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] | |
| 48 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] | |
| 49 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext | |
| 50 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 197 ms | |
| 51 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request | |
| 52 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 | |
| 53 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] | |
| 54 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat started on port(s): 8380 (http) with context path '' | |
| 55 | -2022-03-30 10:43:59 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Started BoardApplication in 0.344 seconds (JVM running for 69.491) | |
| 56 | -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.d.a.ConditionEvaluationDeltaLoggingListener - []:Condition evaluation unchanged | |
| 57 | -2022-03-30 10:44:23 [RMI TCP Connection(14)-127.0.0.1] [INFO ] o.s.b.a.SpringApplicationAdminMXBeanRegistrar$SpringApplicationAdmin - []:Application shutdown requested. | |
| 58 | -2022-03-30 10:44:32 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Starting BoardApplication using Java 1.8.0_202 on sangkiham_PC with PID 2388 (D:\Working\java\board\target\classes started by sangkiham in D:\Working\java\board) | |
| 59 | -2022-03-30 10:44:32 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "run" | |
| 60 | -2022-03-30 10:44:32 [restartedMain] [INFO ] o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - []:Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable | |
| 61 | -2022-03-30 10:44:32 [restartedMain] [INFO ] o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - []:For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' | |
| 62 | -2022-03-30 10:44:32 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. | |
| 63 | -2022-03-30 10:44:32 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 64 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) | |
| 65 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] | |
| 66 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] | |
| 67 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] | |
| 68 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext | |
| 69 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 847 ms | |
| 70 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request | |
| 71 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 | |
| 72 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] | |
| 73 | -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat started on port(s): 8380 (http) with context path '' | |
| 74 | -2022-03-30 10:44:33 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Started BoardApplication in 1.989 seconds (JVM running for 2.614) | |
| 75 | -2022-03-30 10:44:44 [http-nio-8380-exec-1] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring DispatcherServlet 'dispatcherServlet' | |
| 76 | -2022-03-30 10:44:44 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Initializing Servlet 'dispatcherServlet' | |
| 77 | -2022-03-30 10:44:44 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Completed initialization in 1 ms | |
| 78 | -2022-03-30 10:45:00 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Starting BoardApplication using Java 1.8.0_202 on sangkiham_PC with PID 2388 (D:\Working\java\board\target\classes started by sangkiham in D:\Working\java\board) | |
| 79 | -2022-03-30 10:45:00 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "run" | |
| 80 | -2022-03-30 10:45:01 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 81 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) | |
| 82 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] | |
| 83 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] | |
| 84 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] | |
| 85 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext | |
| 86 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 198 ms | |
| 87 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request | |
| 88 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 | |
| 89 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] | |
| 90 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat started on port(s): 8380 (http) with context path '' | |
| 91 | -2022-03-30 10:45:01 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Started BoardApplication in 0.344 seconds (JVM running for 29.897) | |
| 92 | -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.d.a.ConditionEvaluationDeltaLoggingListener - []:Condition evaluation unchanged | |
| 93 | -2022-03-30 10:45:48 [restartedMain] [WARN ] o.m.s.mapper.ClassPathMapperScanner - []:No MyBatis mapper was found in '[com.daeucna.board]' package. Please check your configuration. | |
| 94 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) | |
| 95 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] | |
| 96 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] | |
| 97 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] | |
| 98 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext | |
| 99 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 190 ms | |
| 100 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request | |
| 101 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 | |
| 102 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] | |
| 103 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat started on port(s): 8380 (http) with context path '' | |
| 104 | -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.d.a.ConditionEvaluationDeltaLoggingListener - []:Condition evaluation unchanged | |
| 105 | -2022-03-30 10:45:57 [http-nio-8380-exec-1] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring DispatcherServlet 'dispatcherServlet' | |
| 106 | -2022-03-30 10:45:57 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Initializing Servlet 'dispatcherServlet' | |
| 107 | -2022-03-30 10:45:57 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Completed initialization in 0 ms |
pom.xml
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | + | |
| 4 | 5 | <modelVersion>4.0.0</modelVersion> |
| 5 | 6 | <parent> |
| 6 | 7 | <groupId>org.springframework.boot</groupId> | ... | ... |
pom_war.xml deleted
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 3 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 4 | - <modelVersion>4.0.0</modelVersion> | |
| 5 | - <parent> | |
| 6 | - <groupId>org.springframework.boot</groupId> | |
| 7 | - <artifactId>spring-boot-starter-parent</artifactId> | |
| 8 | - <version>2.6.4</version> | |
| 9 | - <relativePath/> <!-- lookup parent from repository --> | |
| 10 | - </parent> | |
| 11 | - <groupId>com.daeucna</groupId> | |
| 12 | - <artifactId>board</artifactId> | |
| 13 | - <version>0.0.1-SNAPSHOT</version> | |
| 14 | - <name>board</name> | |
| 15 | - <!-- War deploy시--> | |
| 16 | - <packaging>war</packaging> | |
| 17 | - | |
| 18 | - <description>Demo project for Spring Boot</description> | |
| 19 | - <properties> | |
| 20 | - <java.version>1.8</java.version> | |
| 21 | - <jackson.version>2.9.5</jackson.version> | |
| 22 | - </properties> | |
| 23 | - <dependencies> | |
| 24 | - <dependency> | |
| 25 | - <groupId>org.springframework.boot</groupId> | |
| 26 | - <artifactId>spring-boot-starter-web</artifactId> | |
| 27 | - <!-- war deploy시 --> | |
| 28 | - <exclusions> | |
| 29 | - <exclusion> | |
| 30 | - <groupId>org.springframework.boot</groupId> | |
| 31 | - <artifactId>spring-boot-starter-logging</artifactId> | |
| 32 | - </exclusion> | |
| 33 | - </exclusions> | |
| 34 | - | |
| 35 | - </dependency> | |
| 36 | - <dependency> | |
| 37 | - <groupId>org.mybatis.spring.boot</groupId> | |
| 38 | - <artifactId>mybatis-spring-boot-starter</artifactId> | |
| 39 | - <version>2.2.2</version> | |
| 40 | - </dependency> | |
| 41 | - | |
| 42 | - <dependency> | |
| 43 | - <groupId>org.springframework.boot</groupId> | |
| 44 | - <artifactId>spring-boot-devtools</artifactId> | |
| 45 | - <scope>runtime</scope> | |
| 46 | - <optional>true</optional> | |
| 47 | - </dependency> | |
| 48 | - <dependency> | |
| 49 | - <groupId>org.mariadb.jdbc</groupId> | |
| 50 | - <artifactId>mariadb-java-client</artifactId> | |
| 51 | - <scope>runtime</scope> | |
| 52 | - </dependency> | |
| 53 | - <dependency> | |
| 54 | - <groupId>org.springframework.boot</groupId> | |
| 55 | - <artifactId>spring-boot-configuration-processor</artifactId> | |
| 56 | - <optional>true</optional> | |
| 57 | - </dependency> | |
| 58 | - <dependency> | |
| 59 | - <groupId>org.projectlombok</groupId> | |
| 60 | - <artifactId>lombok</artifactId> | |
| 61 | - <optional>true</optional> | |
| 62 | - </dependency> | |
| 63 | - <dependency> | |
| 64 | - <groupId>org.springframework.boot</groupId> | |
| 65 | - <artifactId>spring-boot-starter-test</artifactId> | |
| 66 | - <scope>test</scope> | |
| 67 | - </dependency> | |
| 68 | - <!-- https://mvnrepository.com/artifact/org.bgee.log4jdbc-log4j2/log4jdbc-log4j2-jdbc4.1 --> | |
| 69 | - <dependency> | |
| 70 | - <groupId>org.bgee.log4jdbc-log4j2</groupId> | |
| 71 | - <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId> | |
| 72 | - <version>1.16</version> | |
| 73 | - </dependency> | |
| 74 | - | |
| 75 | - <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --> | |
| 76 | - <dependency> | |
| 77 | - <groupId>io.springfox</groupId> | |
| 78 | - <artifactId>springfox-swagger2</artifactId> | |
| 79 | - <version>2.9.2</version> | |
| 80 | - </dependency> | |
| 81 | - | |
| 82 | - <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui --> | |
| 83 | - <dependency> | |
| 84 | - <groupId>io.springfox</groupId> | |
| 85 | - <artifactId>springfox-swagger-ui</artifactId> | |
| 86 | - <version>2.9.2</version> | |
| 87 | - </dependency> | |
| 88 | - | |
| 89 | - <!-- JUnit4 사용하기 위해서 Vintage Engine 모듈을 제외 --> | |
| 90 | - <dependency> | |
| 91 | - <groupId>org.junit.vintage</groupId> | |
| 92 | - <artifactId>junit-vintage-engine</artifactId> | |
| 93 | - <scope>test</scope> | |
| 94 | - <exclusions> | |
| 95 | - <exclusion> | |
| 96 | - <groupId>org.hamcrest</groupId> | |
| 97 | - <artifactId>hamcrest-core</artifactId> | |
| 98 | - </exclusion> | |
| 99 | - </exclusions> | |
| 100 | - </dependency> | |
| 101 | - | |
| 102 | - <!-- https://mvnrepository.com/artifact/org.springframework/spring-oxm --> | |
| 103 | - <dependency> | |
| 104 | - <groupId>org.springframework</groupId> | |
| 105 | - <artifactId>spring-oxm</artifactId> | |
| 106 | - </dependency> | |
| 107 | - | |
| 108 | - <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-jaxb-annotations --> | |
| 109 | - <dependency> | |
| 110 | - <groupId>com.fasterxml.jackson.module</groupId> | |
| 111 | - <artifactId>jackson-module-jaxb-annotations</artifactId> | |
| 112 | - </dependency> | |
| 113 | - | |
| 114 | - <!-- Apache Commons file upload --> | |
| 115 | - <dependency> | |
| 116 | - <groupId>commons-fileupload</groupId> | |
| 117 | - <artifactId>commons-fileupload</artifactId> | |
| 118 | - <version>1.2.2</version> | |
| 119 | - </dependency> | |
| 120 | - | |
| 121 | - <!-- Apache Commons IO --> | |
| 122 | - <dependency> | |
| 123 | - <groupId>org.apache.commons</groupId> | |
| 124 | - <artifactId>commons-io</artifactId> | |
| 125 | - <version>1.3.2</version> | |
| 126 | - </dependency> | |
| 127 | - | |
| 128 | - <dependency> | |
| 129 | - <groupId>org.springframework.boot</groupId> | |
| 130 | - <artifactId>spring-boot-starter-thymeleaf</artifactId> | |
| 131 | - </dependency> | |
| 132 | - | |
| 133 | - <!-- https://mvnrepository.com/artifact/nz.net.ultraq.thymeleaf/thymeleaf-layout-dialect --> | |
| 134 | - <dependency> | |
| 135 | - <groupId>nz.net.ultraq.thymeleaf</groupId> | |
| 136 | - <artifactId>thymeleaf-layout-dialect</artifactId> | |
| 137 | - <version>3.1.0</version> | |
| 138 | - </dependency> | |
| 139 | - | |
| 140 | - <dependency> | |
| 141 | - <groupId>org.springframework.boot</groupId> | |
| 142 | - <artifactId>spring-boot-starter</artifactId> | |
| 143 | - <!-- war deploy시 --> | |
| 144 | - <exclusions> | |
| 145 | - <exclusion> | |
| 146 | - <groupId>org.springframework.boot</groupId> | |
| 147 | - <artifactId>spring-boot-starter-logging</artifactId> | |
| 148 | - </exclusion> | |
| 149 | - </exclusions> | |
| 150 | - | |
| 151 | - </dependency> | |
| 152 | - <dependency> | |
| 153 | - <groupId>org.springframework.boot</groupId> | |
| 154 | - <artifactId>spring-boot-starter-security</artifactId> | |
| 155 | - </dependency> | |
| 156 | - <dependency> | |
| 157 | - <groupId>org.springframework.security</groupId> | |
| 158 | - <artifactId>spring-security-test</artifactId> | |
| 159 | - <scope>test</scope> | |
| 160 | - </dependency> | |
| 161 | - | |
| 162 | - <!-- War로 패캐징 할때 필요함. --> | |
| 163 | - <dependency> | |
| 164 | - <groupId>org.springframework.boot</groupId> | |
| 165 | - <artifactId>spring-boot-starter-tomcat</artifactId> | |
| 166 | - <scope>provided</scope> | |
| 167 | - </dependency> | |
| 168 | - | |
| 169 | - | |
| 170 | - </dependencies> | |
| 171 | - | |
| 172 | - <build> | |
| 173 | - <plugins> | |
| 174 | - <plugin> | |
| 175 | - <groupId>org.springframework.boot</groupId> | |
| 176 | - <artifactId>spring-boot-maven-plugin</artifactId> | |
| 177 | - <configuration> | |
| 178 | - <excludes> | |
| 179 | - <exclude> | |
| 180 | - <groupId>org.projectlombok</groupId> | |
| 181 | - <artifactId>lombok</artifactId> | |
| 182 | - </exclude> | |
| 183 | - </excludes> | |
| 184 | - </configuration> | |
| 185 | - </plugin> | |
| 186 | - </plugins> | |
| 187 | - </build> | |
| 188 | - | |
| 189 | -</project> |
src/main/java/com/daeucna/board/config/SecurityConfig.java
| ... | ... | @@ -36,7 +36,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { |
| 36 | 36 | |
| 37 | 37 | http |
| 38 | 38 | .formLogin() |
| 39 | - //.loginPage("/login") | |
| 39 | + .loginPage("/login") | |
| 40 | 40 | .loginProcessingUrl("/login_proc") //("로그인 처리 경로") -> 로그인 form 의 action과 일치시켜주어야 한다 즉 스프링시큐어리티가 가로챌 url이다 |
| 41 | 41 | .usernameParameter("loginId") |
| 42 | 42 | .passwordParameter("password") | ... | ... |
src/main/java/com/daeucna/board/security/CustomLoadUserByUsername.java
| ... | ... | @@ -22,7 +22,7 @@ public class CustomLoadUserByUsername implements UserDetailsService{ |
| 22 | 22 | @Override |
| 23 | 23 | public UserDetails loadUserByUsername(String loginId) throws UsernameNotFoundException { |
| 24 | 24 | UserForm userForm = new UserForm(); |
| 25 | - userForm.setLoginId(loginId); | |
| 25 | + userForm.setEmail(loginId); | |
| 26 | 26 | |
| 27 | 27 | UserDto user = null; |
| 28 | 28 | try { | ... | ... |
src/main/java/com/daeucna/board/security/controller/LoginController.java
| 1 | 1 | package com.daeucna.board.security.controller; |
| 2 | 2 | |
| 3 | -import java.security.Principal; | |
| 4 | -import java.util.HashMap; | |
| 5 | -import java.util.Map; | |
| 6 | - | |
| 3 | +import javax.servlet.http.HttpServletRequest; | |
| 4 | +import javax.servlet.http.HttpServletResponse; | |
| 7 | 5 | import javax.servlet.http.HttpSession; |
| 8 | 6 | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | 8 | import org.springframework.http.HttpStatus; |
| 10 | 9 | import org.springframework.http.ResponseEntity; |
| 11 | 10 | import org.springframework.security.core.Authentication; |
| 12 | -import org.springframework.security.core.annotation.AuthenticationPrincipal; | |
| 13 | 11 | import org.springframework.stereotype.Controller; |
| 14 | 12 | import org.springframework.ui.Model; |
| 15 | 13 | import org.springframework.web.bind.annotation.GetMapping; |
| 14 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 16 | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
| 17 | 16 | import org.springframework.web.bind.annotation.ResponseBody; |
| 18 | 17 | |
| 19 | 18 | import com.daeucna.board.security.domain.UserDto; |
| 19 | +import com.daeucna.board.security.domain.UserForm; | |
| 20 | +import com.daeucna.board.security.service.LoginService; | |
| 20 | 21 | |
| 21 | 22 | import lombok.extern.slf4j.Slf4j; |
| 22 | 23 | |
| ... | ... | @@ -25,18 +26,15 @@ import lombok.extern.slf4j.Slf4j; |
| 25 | 26 | @Slf4j |
| 26 | 27 | public class LoginController { |
| 27 | 28 | |
| 28 | - @GetMapping("/login") | |
| 29 | - public String getLogin(Model model) { | |
| 30 | - log.info("로그인 Page"); | |
| 31 | - return "/page/login/login"; | |
| 32 | - } | |
| 33 | - | |
| 34 | - @GetMapping("/fail") | |
| 35 | - public String procFail(Model model) { | |
| 36 | - log.info("로그인 실패"); | |
| 37 | - return "/page/login/fail"; | |
| 38 | - } | |
| 29 | + @Autowired | |
| 30 | + private LoginService loginService; | |
| 39 | 31 | |
| 32 | + @GetMapping("/login") | |
| 33 | + public String getlogin(Model model) { | |
| 34 | + log.info("로그인 Page"); | |
| 35 | + return "page/login/login"; | |
| 36 | + } | |
| 37 | + | |
| 40 | 38 | @GetMapping("/info") |
| 41 | 39 | @ResponseBody |
| 42 | 40 | public String getCurrentUserInfo(HttpSession httpSession) { |
| ... | ... | @@ -49,5 +47,26 @@ public class LoginController { |
| 49 | 47 | return "먼저 로그인을 하세요"; |
| 50 | 48 | } |
| 51 | 49 | } |
| 50 | + | |
| 51 | + @GetMapping("/join") | |
| 52 | + public String getJoin(Model model) { | |
| 53 | + log.info("회원가입 Page"); | |
| 54 | + return "page/login/join"; | |
| 55 | + } | |
| 56 | + | |
| 57 | + @PostMapping("/join_proc") | |
| 58 | + @ResponseBody | |
| 59 | + public ResponseEntity procJoin(HttpServletRequest request, HttpServletResponse response, UserForm userForm) { | |
| 60 | + HttpStatus httpStatus = null; | |
| 61 | + UserForm resultUserForm = null; | |
| 62 | + try { | |
| 63 | + resultUserForm = loginService.procJoin(userForm); | |
| 64 | + | |
| 65 | + httpStatus = HttpStatus.OK; | |
| 66 | + } catch (Exception e) { | |
| 67 | + httpStatus = HttpStatus.BAD_REQUEST; | |
| 68 | + } | |
| 69 | + return new ResponseEntity(resultUserForm, httpStatus); | |
| 70 | + } | |
| 52 | 71 | |
| 53 | 72 | } |
| 54 | 73 | \ No newline at end of file | ... | ... |
src/main/java/com/daeucna/board/security/dao/UserDao.java
| ... | ... | @@ -19,5 +19,9 @@ public class UserDao { |
| 19 | 19 | public UserDto getOne(UserForm userForm) throws Exception { |
| 20 | 20 | return sqlSession.selectOne(NAMESPACE + ".getOne", userForm); |
| 21 | 21 | } |
| 22 | - | |
| 22 | + | |
| 23 | + public int insertUser(UserForm userForm) throws Exception { | |
| 24 | + return sqlSession.insert(NAMESPACE + ".insertUser", userForm); | |
| 25 | + } | |
| 26 | + | |
| 23 | 27 | } |
| 24 | 28 | \ No newline at end of file | ... | ... |
src/main/java/com/daeucna/board/security/domain/UserForm.java
| ... | ... | @@ -6,6 +6,9 @@ import lombok.ToString; |
| 6 | 6 | |
| 7 | 7 | @Getter @Setter @ToString |
| 8 | 8 | public class UserForm { |
| 9 | - private String loginId; | |
| 10 | - private String password; | |
| 9 | + private String name; | |
| 10 | + private String nickname; | |
| 11 | + private String email; | |
| 12 | + private String joinPass; | |
| 13 | + private String result; | |
| 11 | 14 | } | ... | ... |
src/main/java/com/daeucna/board/security/service/LoginService.java
0 → 100644
| 1 | +package com.daeucna.board.security.service; | |
| 2 | + | |
| 3 | +import java.io.File; | |
| 4 | +import java.util.ArrayList; | |
| 5 | +import java.util.HashMap; | |
| 6 | +import java.util.List; | |
| 7 | +import java.util.UUID; | |
| 8 | + | |
| 9 | +import org.slf4j.Logger; | |
| 10 | +import org.slf4j.LoggerFactory; | |
| 11 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | |
| 13 | +import org.springframework.stereotype.Service; | |
| 14 | +import org.springframework.transaction.annotation.Propagation; | |
| 15 | +import org.springframework.transaction.annotation.Transactional; | |
| 16 | +import org.springframework.web.multipart.MultipartFile; | |
| 17 | + | |
| 18 | +import com.daeucna.board.common.PagingUtil; | |
| 19 | +import com.daeucna.board.common.ResultUtil; | |
| 20 | +import com.daeucna.board.dao.BoardDao; | |
| 21 | +import com.daeucna.board.domain.BoardDto; | |
| 22 | +import com.daeucna.board.domain.BoardFileForm; | |
| 23 | +import com.daeucna.board.domain.BoardForm; | |
| 24 | +import com.daeucna.board.domain.CommonDto; | |
| 25 | +import com.daeucna.board.domain.CommonForm; | |
| 26 | +import com.daeucna.board.security.dao.UserDao; | |
| 27 | +import com.daeucna.board.security.domain.UserDto; | |
| 28 | +import com.daeucna.board.security.domain.UserForm; | |
| 29 | + | |
| 30 | +@Transactional(readOnly = true) | |
| 31 | +@Service | |
| 32 | +public class LoginService { | |
| 33 | + | |
| 34 | + protected final Logger logger = LoggerFactory.getLogger(LoginService.class); | |
| 35 | + | |
| 36 | + @Autowired | |
| 37 | + private UserDao userDao; | |
| 38 | + @Autowired | |
| 39 | + private BCryptPasswordEncoder bCryptPasswordEncoder; | |
| 40 | + | |
| 41 | + /** join 처리 */ | |
| 42 | + @Transactional(readOnly = false, propagation = Propagation.REQUIRED) | |
| 43 | + public UserForm procJoin(UserForm userForm) throws Exception { | |
| 44 | + int insertCnt = 0; | |
| 45 | + //패스워드 암호화 | |
| 46 | + userForm.setJoinPass(bCryptPasswordEncoder.encode(userForm.getJoinPass())); | |
| 47 | + | |
| 48 | + insertCnt = userDao.insertUser(userForm); | |
| 49 | + | |
| 50 | + if (insertCnt > 0) { | |
| 51 | + userForm.setResult("SUCCESS"); | |
| 52 | + } else { | |
| 53 | + userForm.setResult("FAIL"); | |
| 54 | + } | |
| 55 | + | |
| 56 | + return userForm; | |
| 57 | + } | |
| 58 | + | |
| 59 | +} | ... | ... |
src/main/resources/logback-run.properties
src/main/resources/mapper/board/security/UserMapper.xml
| ... | ... | @@ -13,8 +13,30 @@ |
| 13 | 13 | ON |
| 14 | 14 | A.USERNAME = B.USERNAME |
| 15 | 15 | WHERE |
| 16 | - A.USERNAME = #{loginId} | |
| 16 | + A.USERNAME = #{email} | |
| 17 | 17 | AND A.isEnabled = 'Y' |
| 18 | 18 | </select> |
| 19 | 19 | |
| 20 | + <insert id="insertUser" parameterType="com.daeucna.board.security.domain.UserForm"> | |
| 21 | + | |
| 22 | + INSERT | |
| 23 | + INTO BOARD.USER | |
| 24 | + ( | |
| 25 | + USERNAME | |
| 26 | + , REALNAME | |
| 27 | + , NICKNAME | |
| 28 | + , PASSWORD | |
| 29 | + , ISENABLED | |
| 30 | + ) | |
| 31 | + VALUES | |
| 32 | + ( | |
| 33 | + #{email} | |
| 34 | + , #{name} | |
| 35 | + , #{nickname} | |
| 36 | + , #{joinPass} | |
| 37 | + , 'Y' | |
| 38 | + ) | |
| 39 | + | |
| 40 | + </insert> | |
| 41 | + | |
| 20 | 42 | </mapper> | ... | ... |
src/main/resources/templates/fragment/configNoCustom.html
0 → 100644
| 1 | +<html lagn="ko" | |
| 2 | + xmlns:th="http://www.thymeleaf.org" | |
| 3 | + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> | |
| 4 | + | |
| 5 | + <!--configFragment 선언--> | |
| 6 | + <th:block th:fragment="configFragment"> | |
| 7 | + | |
| 8 | + | |
| 9 | + <!-- 이 영역에 공통으로 사용할 css, js library를 선언한다. --> | |
| 10 | + <link rel="stylesheet" th:href="@{/css/common/bootstrap.css}"> | |
| 11 | + | |
| 12 | + <script th:src="@{/js/common/jquery.js}"></script> | |
| 13 | + <script th:src="@{/js/common/jquery.form.js}"></script> | |
| 14 | + <script th:src="@{/js/common/bootstrap.js}"></script> | |
| 15 | + | |
| 16 | + <!-- Content Page의 CSS fragment 삽입 --> | |
| 17 | + <th:block layout:fragment="css"></th:block> | |
| 18 | + | |
| 19 | + <!-- Content Page의 script fragment 삽입 --> | |
| 20 | + <th:block layout:fragment="script"></th:block> | |
| 21 | + | |
| 22 | + </th:block> | |
| 23 | +</html> | |
| 0 | 24 | \ No newline at end of file | ... | ... |
src/main/resources/templates/fragment/header.html
src/main/resources/templates/layout/default_layout.html
src/main/resources/templates/layout/oneDoc_layout.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | + | |
| 3 | +<html lagn="ko" | |
| 4 | + xmlns:th="http://www.thymeleaf.org" | |
| 5 | + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> | |
| 6 | + | |
| 7 | + <head> | |
| 8 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| 9 | + <title>>**<</title> | |
| 10 | + | |
| 11 | + <!-- config fragment 사용 --> | |
| 12 | + <th:block th:replace="fragment/configNoCustom :: configFragment" ></th:block> | |
| 13 | + </head> | |
| 14 | + | |
| 15 | + <body> | |
| 16 | + <!-- | |
| 17 | + content fragment 사용 | |
| 18 | + 현재 layout을 사용하는 content fragment의 내용을 삽입한다. | |
| 19 | + --> | |
| 20 | + <div style="height: 100%;"> | |
| 21 | + <th:block layout:fragment="content"></th:block> | |
| 22 | + </div> | |
| 23 | + </body> | |
| 24 | + | |
| 25 | +</html> | |
| 0 | 26 | \ No newline at end of file | ... | ... |
| 1 | +<!DOCTYPE html> | |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" | |
| 3 | + xmlns:th="http://www.thymeleaf.org" | |
| 4 | + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" | |
| 5 | + layout:decorate="~{layout/oneDoc_layout}"> | |
| 6 | + | |
| 7 | + <!-- index.html 고유 CSS 추가 --> | |
| 8 | + <th:block layout:fragment="css"> | |
| 9 | + <style> | |
| 10 | + body { | |
| 11 | + min-height: 100vh; | |
| 12 | + background: -webkit-gradient(linear, left bottom, right top, from(#92b5db), to(#1d466c)); | |
| 13 | + background: -webkit-linear-gradient(bottom left, #92b5db 0%, #1d466c 100%); | |
| 14 | + background: -moz-linear-gradient(bottom left, #92b5db 0%, #1d466c 100%); | |
| 15 | + background: -o-linear-gradient(bottom left, #92b5db 0%, #1d466c 100%); | |
| 16 | + background: linear-gradient(to top right, #92b5db 0%, #1d466c 100%); | |
| 17 | + } | |
| 18 | + .input-form { | |
| 19 | + max-width: 680px; | |
| 20 | + margin-top: 80px; | |
| 21 | + padding: 32px; | |
| 22 | + background: #fff; | |
| 23 | + -webkit-border-radius: 10px; | |
| 24 | + -moz-border-radius: 10px; | |
| 25 | + border-radius: 10px; | |
| 26 | + -webkit-box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15); | |
| 27 | + -moz-box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15); | |
| 28 | + box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 0.15); | |
| 29 | + } | |
| 30 | + </style> | |
| 31 | + </th:block> | |
| 32 | + | |
| 33 | + <!-- index.html 고유 스크립트 추가 --> | |
| 34 | + <th:block layout:fragment="script"> | |
| 35 | + <script type="text/javascript"> | |
| 36 | + | |
| 37 | + $(document).ready(function(){ | |
| 38 | + | |
| 39 | + $("#btnJoin").click(function(e) { | |
| 40 | + var form = $(".validation-form"); | |
| 41 | + if (form[0].checkValidity() === false) | |
| 42 | + { | |
| 43 | + event.preventDefault(); | |
| 44 | + event.stopPropagation(); | |
| 45 | + } else { | |
| 46 | + procJoin(); | |
| 47 | + } | |
| 48 | + form.addClass('was-validated'); | |
| 49 | + | |
| 50 | + return false; | |
| 51 | + }); | |
| 52 | + | |
| 53 | + }); | |
| 54 | + | |
| 55 | + | |
| 56 | + /** 게시판 - 목록 조회 */ | |
| 57 | + function procJoin(){ | |
| 58 | + | |
| 59 | + var pss1 = $("#joinPass1").val(); | |
| 60 | + var pss2 = $("#joinPass2").val(); | |
| 61 | + | |
| 62 | + if (pss1 != pss2) { | |
| 63 | + showAlert("Error", "패스워드와 패스워드 확인이 일치하지 않습니다"); | |
| 64 | + return false; | |
| 65 | + } | |
| 66 | + | |
| 67 | + $.ajax({ | |
| 68 | + url : "[[@{/}]]join_proc", | |
| 69 | + data : $(".validation-form").serialize(), | |
| 70 | + dataType : "JSON", | |
| 71 | + cache : false, | |
| 72 | + async : true, | |
| 73 | + type : "POST", | |
| 74 | + success : function(result) { | |
| 75 | + showAlert("Success", "등록이 완료되었습니다. 로그인페이지로 이동합니다"); | |
| 76 | + location.href = "[[@{/}]]"; | |
| 77 | + }, | |
| 78 | + error : function(xhr, status, error) { | |
| 79 | + showAlert(status, msg); | |
| 80 | + } | |
| 81 | + }); | |
| 82 | + } | |
| 83 | + | |
| 84 | + function showAlert(pStatus, pMsg){ | |
| 85 | + alert("[" + pStatus + "]:" + pMsg); | |
| 86 | + } | |
| 87 | + | |
| 88 | + </script> | |
| 89 | + </th:block> | |
| 90 | + | |
| 91 | + <th:block layout:fragment="content"> | |
| 92 | + <div class="container"> | |
| 93 | + <div class="input-form-backgroud row"> | |
| 94 | + <div class="input-form col-md-12 mx-auto"> | |
| 95 | + <h4 class="mb-3">사용자 등록</h4> | |
| 96 | + <form class="validation-form" novalidate> | |
| 97 | + <div class="row"> | |
| 98 | + <div class="col-md-6 mb-3"> | |
| 99 | + <label for="name">이름</label> | |
| 100 | + <input type="text" class="form-control" id="name" name="name" placeholder="" value="" required /> | |
| 101 | + <div class="invalid-feedback">이름을 입력해주세요.</div> | |
| 102 | + </div> | |
| 103 | + <div class="col-md-6 mb-3"> | |
| 104 | + <label for="nickname">별명</label> | |
| 105 | + <input type="text" class="form-control" id="nickname" name="nickname" placeholder="" value="" required /> | |
| 106 | + <div class="invalid-feedback">별명을 입력해주세요.</div> | |
| 107 | + </div> | |
| 108 | + </div> | |
| 109 | + <div class="mb-3"> | |
| 110 | + <label for="email">이메일</label> | |
| 111 | + <input type="email" class="form-control" id="email" name="email" placeholder="you@example.com" required /> | |
| 112 | + <div class="invalid-feedback">이메일을 입력해주세요.</div> | |
| 113 | + </div> | |
| 114 | + <div class="row"> | |
| 115 | + <div class="col-md-6 mb-3"> | |
| 116 | + <label for="joinPass1">암호</label> | |
| 117 | + <input type="password" class="form-control" id="joinPass1" name="joinPass" placeholder="" value="" required /> | |
| 118 | + <div class="invalid-feedback">암호를 입력해주세요.</div> | |
| 119 | + </div> | |
| 120 | + <div class="col-md-6 mb-3"> | |
| 121 | + <label for="joinPass2">암호 확인</label> | |
| 122 | + <input type="password" class="form-control" id="joinPass2" placeholder="" value="" required /> | |
| 123 | + <div class="invalid-feedback">암호확인을 입력해주세요.</div> | |
| 124 | + </div> | |
| 125 | + </div> | |
| 126 | + <hr class="mb-4" /> | |
| 127 | + <div class="custom-control custom-checkbox"> | |
| 128 | + <input type="checkbox" class="custom-control-input" id="aggrement" required /> | |
| 129 | + <label class="custom-control-label" for="aggrement">개인정보 수집 및 이용에 동의합니다.</label> | |
| 130 | + </div> | |
| 131 | + <div class="mb-4" /> | |
| 132 | + <button class="form-control btn btn-primary btn-lg btn-block" id="btnJoin">가입 완료</button> | |
| 133 | + </form> | |
| 134 | + </div> | |
| 135 | + </div> | |
| 136 | + </div> | |
| 137 | + | |
| 138 | + </th:block> | |
| 139 | +</html> | |
| 140 | + | ... | ... |
| 1 | +<!DOCTYPE html> | |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml" | |
| 3 | + xmlns:th="http://www.thymeleaf.org" | |
| 4 | + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" | |
| 5 | + layout:decorate="~{layout/oneDoc_layout}"> | |
| 6 | + | |
| 7 | + <!-- index.html 고유 CSS 추가 --> | |
| 8 | + <th:block layout:fragment="css"> | |
| 9 | + <style> | |
| 10 | + html { | |
| 11 | + height: 100%; | |
| 12 | + } | |
| 13 | + | |
| 14 | + body { | |
| 15 | + width:100%; | |
| 16 | + height:100%; | |
| 17 | + margin: 0; | |
| 18 | + padding-top: 80px; | |
| 19 | + padding-bottom: 40px; | |
| 20 | + font-family: "Nanum Gothic", arial, helvetica, sans-serif; | |
| 21 | + background: -webkit-gradient(linear, left bottom, right top, from(#92b5db), to(#1d466c)); | |
| 22 | + background: -webkit-linear-gradient(bottom left, #92b5db 0%, #1d466c 100%); | |
| 23 | + background: -moz-linear-gradient(bottom left, #92b5db 0%, #1d466c 100%); | |
| 24 | + background: -o-linear-gradient(bottom left, #92b5db 0%, #1d466c 100%); | |
| 25 | + background: linear-gradient(to top right, #92b5db 0%, #1d466c 100%); | |
| 26 | + | |
| 27 | + } | |
| 28 | + | |
| 29 | + .card { | |
| 30 | + margin: 0 auto; /* Added */ | |
| 31 | + float: none; /* Added */ | |
| 32 | + margin-bottom: 10px; /* Added */ | |
| 33 | + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | |
| 34 | + } | |
| 35 | + | |
| 36 | + .form-signin .form-control { | |
| 37 | + position: relative; | |
| 38 | + height: auto; | |
| 39 | + -webkit-box-sizing: border-box; | |
| 40 | + -moz-box-sizing: border-box; | |
| 41 | + box-sizing: border-box; | |
| 42 | + padding: 10px; | |
| 43 | + font-size: 16px; | |
| 44 | + } | |
| 45 | + </style> | |
| 46 | + </th:block> | |
| 47 | + | |
| 48 | + <!-- index.html 고유 스크립트 추가 --> | |
| 49 | + <th:block layout:fragment="script"> | |
| 50 | + <script type="text/javascript"> | |
| 51 | + $(document).ready(function(){ | |
| 52 | + | |
| 53 | + $("#btn-join").click(function(e) { | |
| 54 | + location.href = "[[@{/}]]join"; | |
| 55 | + }); | |
| 56 | + | |
| 57 | + }); | |
| 58 | + </script> | |
| 59 | + </th:block> | |
| 60 | + <th:block layout:fragment="content"> | |
| 61 | + <div class="card align-middle" style="width:20rem; border-radius:20px;"> | |
| 62 | + <div class="card-title" style="margin-top:30px;"> | |
| 63 | + <h2 class="card-title text-center" style="color:#113366;">LOGIN</h2> | |
| 64 | + </div> | |
| 65 | + <div class="card-body"> | |
| 66 | + <form class="form-signin" method="POST" th:action="@{/login_proc}"> | |
| 67 | + <div class="row"> | |
| 68 | + <div class="col"> | |
| 69 | + <label for="uid" class="sr-only">메일주소</label> | |
| 70 | + <input type="email" id="uid" name="loginId" class="form-control" placeholder="name@example.com" required autofocus><BR> | |
| 71 | + </div> | |
| 72 | + </div> | |
| 73 | + <div class="row"> | |
| 74 | + <div class="col"> | |
| 75 | + <label for="upw" class="sr-only">암호</label> | |
| 76 | + <input type="password" id="upw" name="password" class="form-control" placeholder="비밀번호" required><br> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <div class="row"> | |
| 80 | + <div class="col"> | |
| 81 | + <button id="btn-login" class="form-control btn btn-lg btn-primary btn-block" type="submit">로그인</button> | |
| 82 | + </div> | |
| 83 | + <div class="col"> | |
| 84 | + <button id="btn-join" class="form-control btn btn-lg btn-primary btn-block">사용자등록</button> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + </form> | |
| 88 | + </div> | |
| 89 | + </div> | |
| 90 | + </th:block> | |
| 91 | +</html> | |
| 92 | + | ... | ... |