diff --git a/log.config.path_IS_UNDEFINED/err_log.2022-03-29_0.log b/log.config.path_IS_UNDEFINED/err_log.2022-03-29_0.log deleted file mode 100644 index 167b5e0..0000000 --- a/log.config.path_IS_UNDEFINED/err_log.2022-03-29_0.log +++ /dev/null @@ -1,18 +0,0 @@ -2022-03-29 11:08:41 [restartedMain] [ERROR] o.s.b.d.LoggingFailureAnalysisReporter - []: - -*************************** -APPLICATION FAILED TO START -*************************** - -Description: - -Field boardDao in com.daeucna.board.service.BoardService required a bean named 'sqlSession' that could not be found. - -The injection point has the following annotations: - - @org.springframework.beans.factory.annotation.Autowired(required=true) - - -Action: - -Consider defining a bean named 'sqlSession' in your configuration. - diff --git a/log.config.path_IS_UNDEFINED/err_log.log b/log.config.path_IS_UNDEFINED/err_log.log deleted file mode 100644 index cb449a8..0000000 --- a/log.config.path_IS_UNDEFINED/err_log.log +++ /dev/null @@ -1,35 +0,0 @@ -2022-03-30 10:35:05 [restartedMain] [ERROR] o.s.boot.SpringApplication - []:Application run failed -java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:328) - at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:282) - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:240) - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) - at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) - at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) - at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85) - at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66) - at java.util.ArrayList.forEach(ArrayList.java:1257) - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120) - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114) - at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65) - at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:339) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:297) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) - at com.daeucna.board.BoardApplication.main(BoardApplication.java:12) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) -Caused by: java.lang.IllegalStateException: Logback configuration error detected: -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. - at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179) - at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) - at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) - at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132) - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) - ... 23 common frames omitted diff --git a/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.2022-03-29_0.log b/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.2022-03-29_0.log deleted file mode 100644 index 0453d28..0000000 --- a/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.2022-03-29_0.log +++ /dev/null @@ -1,37 +0,0 @@ -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) -2022-03-29 11:08:40 [restartedMain] [DEBUG] com.daeucna.board.BoardApplication - []:Running with Spring Boot v2.6.4, Spring v5.3.16 -2022-03-29 11:08:40 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "pom.xml" -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 -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' -2022-03-29 11:08:41 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. -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. -2022-03-29 11:08:41 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8080 (http) -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8080"] -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] -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. -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext -2022-03-29 11:08:41 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 681 ms -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 -2022-03-29 11:08:41 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Stopping service [Tomcat] -2022-03-29 11:08:41 [restartedMain] [INFO ] o.s.b.a.l.ConditionEvaluationReportLoggingListener - []: - -Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. -2022-03-29 11:08:41 [restartedMain] [ERROR] o.s.b.d.LoggingFailureAnalysisReporter - []: - -*************************** -APPLICATION FAILED TO START -*************************** - -Description: - -Field boardDao in com.daeucna.board.service.BoardService required a bean named 'sqlSession' that could not be found. - -The injection point has the following annotations: - - @org.springframework.beans.factory.annotation.Autowired(required=true) - - -Action: - -Consider defining a bean named 'sqlSession' in your configuration. - diff --git a/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.log b/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.log deleted file mode 100644 index 738eaa4..0000000 --- a/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.log +++ /dev/null @@ -1,107 +0,0 @@ -2022-03-30 10:35:05 [restartedMain] [ERROR] o.s.boot.SpringApplication - []:Application run failed -java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected: -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:328) - at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:282) - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:240) - at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) - at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) - at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) - at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) - at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:85) - at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:66) - at java.util.ArrayList.forEach(ArrayList.java:1257) - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120) - at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114) - at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:65) - at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:339) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:297) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) - at com.daeucna.board.BoardApplication.main(BoardApplication.java:12) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) -Caused by: java.lang.IllegalStateException: Logback configuration error detected: -ERROR in ch.qos.logback.core.joran.action.PropertyAction - Could not find resource [logback-dev.properties]. - at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179) - at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) - at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) - at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:132) - at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) - ... 23 common frames omitted -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. -2022-03-30 10:41:37 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. -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. -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. -2022-03-30 10:42:51 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. -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. -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) -2022-03-30 10:43:58 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "run" -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. -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 197 ms -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 -2022-03-30 10:43:59 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] -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 '' -2022-03-30 10:43:59 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Started BoardApplication in 0.344 seconds (JVM running for 69.491) -2022-03-30 10:43:59 [restartedMain] [INFO ] o.s.b.d.a.ConditionEvaluationDeltaLoggingListener - []:Condition evaluation unchanged -2022-03-30 10:44:23 [RMI TCP Connection(14)-127.0.0.1] [INFO ] o.s.b.a.SpringApplicationAdminMXBeanRegistrar$SpringApplicationAdmin - []:Application shutdown requested. -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) -2022-03-30 10:44:32 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "run" -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 -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' -2022-03-30 10:44:32 [restartedMain] [DEBUG] org.apache.ibatis.logging.LogFactory - []:Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter. -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. -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 847 ms -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request -2022-03-30 10:44:33 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 -2022-03-30 10:44:33 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] -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 '' -2022-03-30 10:44:33 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Started BoardApplication in 1.989 seconds (JVM running for 2.614) -2022-03-30 10:44:44 [http-nio-8380-exec-1] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring DispatcherServlet 'dispatcherServlet' -2022-03-30 10:44:44 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Initializing Servlet 'dispatcherServlet' -2022-03-30 10:44:44 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Completed initialization in 1 ms -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) -2022-03-30 10:45:00 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:The following 1 profile is active: "run" -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. -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 198 ms -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 -2022-03-30 10:45:01 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] -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 '' -2022-03-30 10:45:01 [restartedMain] [INFO ] com.daeucna.board.BoardApplication - []:Started BoardApplication in 0.344 seconds (JVM running for 29.897) -2022-03-30 10:45:01 [restartedMain] [INFO ] o.s.b.d.a.ConditionEvaluationDeltaLoggingListener - []:Condition evaluation unchanged -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. -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.w.e.tomcat.TomcatWebServer - []:Tomcat initialized with port(s): 8380 (http) -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Initializing ProtocolHandler ["http-nio-8380"] -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.catalina.core.StandardService - []:Starting service [Tomcat] -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.catalina.core.StandardEngine - []:Starting Servlet engine: [Apache Tomcat/9.0.58] -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring embedded WebApplicationContext -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.w.s.c.ServletWebServerApplicationContext - []:Root WebApplicationContext: initialization completed in 190 ms -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.s.web.DefaultSecurityFilterChain - []:Will not secure any request -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.d.a.OptionalLiveReloadServer - []:LiveReload server is running on port 35729 -2022-03-30 10:45:48 [restartedMain] [INFO ] o.a.coyote.http11.Http11NioProtocol - []:Starting ProtocolHandler ["http-nio-8380"] -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 '' -2022-03-30 10:45:48 [restartedMain] [INFO ] o.s.b.d.a.ConditionEvaluationDeltaLoggingListener - []:Condition evaluation unchanged -2022-03-30 10:45:57 [http-nio-8380-exec-1] [INFO ] o.a.c.c.C.[Tomcat].[localhost].[/] - []:Initializing Spring DispatcherServlet 'dispatcherServlet' -2022-03-30 10:45:57 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Initializing Servlet 'dispatcherServlet' -2022-03-30 10:45:57 [http-nio-8380-exec-1] [INFO ] o.s.web.servlet.DispatcherServlet - []:Completed initialization in 0 ms diff --git a/pom.xml b/pom.xml index fd4ecc5..0100b45 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,7 @@ + 4.0.0 org.springframework.boot diff --git a/pom_war.xml b/pom_war.xml deleted file mode 100644 index b9fcd7c..0000000 --- a/pom_war.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.6.4 - - - com.daeucna - board - 0.0.1-SNAPSHOT - board - - war - - Demo project for Spring Boot - - 1.8 - 2.9.5 - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.boot - spring-boot-starter-logging - - - - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 2.2.2 - - - - org.springframework.boot - spring-boot-devtools - runtime - true - - - org.mariadb.jdbc - mariadb-java-client - runtime - - - org.springframework.boot - spring-boot-configuration-processor - true - - - org.projectlombok - lombok - true - - - org.springframework.boot - spring-boot-starter-test - test - - - - org.bgee.log4jdbc-log4j2 - log4jdbc-log4j2-jdbc4.1 - 1.16 - - - - - io.springfox - springfox-swagger2 - 2.9.2 - - - - - io.springfox - springfox-swagger-ui - 2.9.2 - - - - - org.junit.vintage - junit-vintage-engine - test - - - org.hamcrest - hamcrest-core - - - - - - - org.springframework - spring-oxm - - - - - com.fasterxml.jackson.module - jackson-module-jaxb-annotations - - - - - commons-fileupload - commons-fileupload - 1.2.2 - - - - - org.apache.commons - commons-io - 1.3.2 - - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - - - nz.net.ultraq.thymeleaf - thymeleaf-layout-dialect - 3.1.0 - - - - org.springframework.boot - spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-logging - - - - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.security - spring-security-test - test - - - - - org.springframework.boot - spring-boot-starter-tomcat - provided - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - org.projectlombok - lombok - - - - - - - - diff --git a/src/main/java/com/daeucna/board/config/SecurityConfig.java b/src/main/java/com/daeucna/board/config/SecurityConfig.java index 7b2ac6a..c569936 100644 --- a/src/main/java/com/daeucna/board/config/SecurityConfig.java +++ b/src/main/java/com/daeucna/board/config/SecurityConfig.java @@ -36,7 +36,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { http .formLogin() - //.loginPage("/login") + .loginPage("/login") .loginProcessingUrl("/login_proc") //("로그인 처리 경로") -> 로그인 form 의 action과 일치시켜주어야 한다 즉 스프링시큐어리티가 가로챌 url이다 .usernameParameter("loginId") .passwordParameter("password") diff --git a/src/main/java/com/daeucna/board/security/CustomLoadUserByUsername.java b/src/main/java/com/daeucna/board/security/CustomLoadUserByUsername.java index f3bd8e9..8f64283 100644 --- a/src/main/java/com/daeucna/board/security/CustomLoadUserByUsername.java +++ b/src/main/java/com/daeucna/board/security/CustomLoadUserByUsername.java @@ -22,7 +22,7 @@ public class CustomLoadUserByUsername implements UserDetailsService{ @Override public UserDetails loadUserByUsername(String loginId) throws UsernameNotFoundException { UserForm userForm = new UserForm(); - userForm.setLoginId(loginId); + userForm.setEmail(loginId); UserDto user = null; try { diff --git a/src/main/java/com/daeucna/board/security/controller/LoginController.java b/src/main/java/com/daeucna/board/security/controller/LoginController.java index ef888e7..c91111f 100644 --- a/src/main/java/com/daeucna/board/security/controller/LoginController.java +++ b/src/main/java/com/daeucna/board/security/controller/LoginController.java @@ -1,22 +1,23 @@ package com.daeucna.board.security.controller; -import java.security.Principal; -import java.util.HashMap; -import java.util.Map; - +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; -import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.daeucna.board.security.domain.UserDto; +import com.daeucna.board.security.domain.UserForm; +import com.daeucna.board.security.service.LoginService; import lombok.extern.slf4j.Slf4j; @@ -25,18 +26,15 @@ import lombok.extern.slf4j.Slf4j; @Slf4j public class LoginController { - @GetMapping("/login") - public String getLogin(Model model) { - log.info("로그인 Page"); - return "/page/login/login"; - } - - @GetMapping("/fail") - public String procFail(Model model) { - log.info("로그인 실패"); - return "/page/login/fail"; - } + @Autowired + private LoginService loginService; + @GetMapping("/login") + public String getlogin(Model model) { + log.info("로그인 Page"); + return "page/login/login"; + } + @GetMapping("/info") @ResponseBody public String getCurrentUserInfo(HttpSession httpSession) { @@ -49,5 +47,26 @@ public class LoginController { return "먼저 로그인을 하세요"; } } + + @GetMapping("/join") + public String getJoin(Model model) { + log.info("회원가입 Page"); + return "page/login/join"; + } + + @PostMapping("/join_proc") + @ResponseBody + public ResponseEntity procJoin(HttpServletRequest request, HttpServletResponse response, UserForm userForm) { + HttpStatus httpStatus = null; + UserForm resultUserForm = null; + try { + resultUserForm = loginService.procJoin(userForm); + + httpStatus = HttpStatus.OK; + } catch (Exception e) { + httpStatus = HttpStatus.BAD_REQUEST; + } + return new ResponseEntity(resultUserForm, httpStatus); + } } \ No newline at end of file diff --git a/src/main/java/com/daeucna/board/security/dao/UserDao.java b/src/main/java/com/daeucna/board/security/dao/UserDao.java index 04643b5..4dff8e8 100644 --- a/src/main/java/com/daeucna/board/security/dao/UserDao.java +++ b/src/main/java/com/daeucna/board/security/dao/UserDao.java @@ -19,5 +19,9 @@ public class UserDao { public UserDto getOne(UserForm userForm) throws Exception { return sqlSession.selectOne(NAMESPACE + ".getOne", userForm); } - + + public int insertUser(UserForm userForm) throws Exception { + return sqlSession.insert(NAMESPACE + ".insertUser", userForm); + } + } \ No newline at end of file diff --git a/src/main/java/com/daeucna/board/security/domain/UserForm.java b/src/main/java/com/daeucna/board/security/domain/UserForm.java index 3792d9e..20a6860 100644 --- a/src/main/java/com/daeucna/board/security/domain/UserForm.java +++ b/src/main/java/com/daeucna/board/security/domain/UserForm.java @@ -6,6 +6,9 @@ import lombok.ToString; @Getter @Setter @ToString public class UserForm { - private String loginId; - private String password; + private String name; + private String nickname; + private String email; + private String joinPass; + private String result; } diff --git a/src/main/java/com/daeucna/board/security/service/LoginService.java b/src/main/java/com/daeucna/board/security/service/LoginService.java new file mode 100644 index 0000000..0bf7e6b --- /dev/null +++ b/src/main/java/com/daeucna/board/security/service/LoginService.java @@ -0,0 +1,59 @@ +package com.daeucna.board.security.service; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import com.daeucna.board.common.PagingUtil; +import com.daeucna.board.common.ResultUtil; +import com.daeucna.board.dao.BoardDao; +import com.daeucna.board.domain.BoardDto; +import com.daeucna.board.domain.BoardFileForm; +import com.daeucna.board.domain.BoardForm; +import com.daeucna.board.domain.CommonDto; +import com.daeucna.board.domain.CommonForm; +import com.daeucna.board.security.dao.UserDao; +import com.daeucna.board.security.domain.UserDto; +import com.daeucna.board.security.domain.UserForm; + +@Transactional(readOnly = true) +@Service +public class LoginService { + + protected final Logger logger = LoggerFactory.getLogger(LoginService.class); + + @Autowired + private UserDao userDao; + @Autowired + private BCryptPasswordEncoder bCryptPasswordEncoder; + + /** join 처리 */ + @Transactional(readOnly = false, propagation = Propagation.REQUIRED) + public UserForm procJoin(UserForm userForm) throws Exception { + int insertCnt = 0; + //패스워드 암호화 + userForm.setJoinPass(bCryptPasswordEncoder.encode(userForm.getJoinPass())); + + insertCnt = userDao.insertUser(userForm); + + if (insertCnt > 0) { + userForm.setResult("SUCCESS"); + } else { + userForm.setResult("FAIL"); + } + + return userForm; + } + +} diff --git a/src/main/resources/logback-run.properties b/src/main/resources/logback-run.properties index 0685ece..ec72601 100644 --- a/src/main/resources/logback-run.properties +++ b/src/main/resources/logback-run.properties @@ -1,2 +1,2 @@ -log.config.path=/logs/board +log.config.path=/home/daeuadm/JBossDeploy/log/board log.config.filename=board_log \ No newline at end of file diff --git a/src/main/resources/mapper/board/security/UserMapper.xml b/src/main/resources/mapper/board/security/UserMapper.xml index 84b5983..5b91371 100644 --- a/src/main/resources/mapper/board/security/UserMapper.xml +++ b/src/main/resources/mapper/board/security/UserMapper.xml @@ -13,8 +13,30 @@ ON A.USERNAME = B.USERNAME WHERE - A.USERNAME = #{loginId} + A.USERNAME = #{email} AND A.isEnabled = 'Y' + + + INSERT + INTO BOARD.USER + ( + USERNAME + , REALNAME + , NICKNAME + , PASSWORD + , ISENABLED + ) + VALUES + ( + #{email} + , #{name} + , #{nickname} + , #{joinPass} + , 'Y' + ) + + + diff --git a/src/main/resources/templates/fragment/configNoCustom.html b/src/main/resources/templates/fragment/configNoCustom.html new file mode 100644 index 0000000..31e970f --- /dev/null +++ b/src/main/resources/templates/fragment/configNoCustom.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/fragment/header.html b/src/main/resources/templates/fragment/header.html index ebd6675..6f0df53 100644 --- a/src/main/resources/templates/fragment/header.html +++ b/src/main/resources/templates/fragment/header.html @@ -15,5 +15,5 @@ - + \ No newline at end of file diff --git a/src/main/resources/templates/layout/default_layout.html b/src/main/resources/templates/layout/default_layout.html index 38af008..3f4cab9 100644 --- a/src/main/resources/templates/layout/default_layout.html +++ b/src/main/resources/templates/layout/default_layout.html @@ -6,7 +6,7 @@ - 게시판 + >**< diff --git a/src/main/resources/templates/layout/oneDoc_layout.html b/src/main/resources/templates/layout/oneDoc_layout.html new file mode 100644 index 0000000..8f6f5be --- /dev/null +++ b/src/main/resources/templates/layout/oneDoc_layout.html @@ -0,0 +1,25 @@ + + + + + + + >**< + + + + + + + +
+ +
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/page/login/join.html b/src/main/resources/templates/page/login/join.html new file mode 100644 index 0000000..d03a74d --- /dev/null +++ b/src/main/resources/templates/page/login/join.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + +
+
+
+

사용자 등록

+
+
+
+ + +
이름을 입력해주세요.
+
+
+ + +
별명을 입력해주세요.
+
+
+
+ + +
이메일을 입력해주세요.
+
+
+
+ + +
암호를 입력해주세요.
+
+
+ + +
암호확인을 입력해주세요.
+
+
+
+
+ + +
+
+ + +
+
+
+ + + + diff --git a/src/main/resources/templates/page/login/login.html b/src/main/resources/templates/page/login/login.html new file mode 100644 index 0000000..0cda56f --- /dev/null +++ b/src/main/resources/templates/page/login/login.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + + +
+
+

LOGIN

+
+
+ +
+
+
+ + diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5e94951 --- /dev/null +++ b/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + -- libgit2 0.21.4