diff --git a/.tern-project b/.tern-project new file mode 100644 index 0000000..4e84a12 --- /dev/null +++ b/.tern-project @@ -0,0 +1,16 @@ +{ + "plugins": { + "guess-types": { + + }, + "outline": { + + }, + "angular": { + + } + }, + "libs": [ + "browser" + ] +} \ No newline at end of file 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 new file mode 100644 index 0000000..167b5e0 --- /dev/null +++ b/log.config.path_IS_UNDEFINED/err_log.2022-03-29_0.log @@ -0,0 +1,18 @@ +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 index 167b5e0..cb449a8 100644 --- a/log.config.path_IS_UNDEFINED/err_log.log +++ b/log.config.path_IS_UNDEFINED/err_log.log @@ -1,18 +1,35 @@ -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. - +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 new file mode 100644 index 0000000..0453d28 --- /dev/null +++ b/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.2022-03-29_0.log @@ -0,0 +1,37 @@ +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 index 0453d28..738eaa4 100644 --- a/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.log +++ b/log.config.path_IS_UNDEFINED/log.config.filename_IS_UNDEFINED.log @@ -1,37 +1,107 @@ -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. - +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 6c04dc0..fd4ecc5 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ org.mybatis.spring.boot mybatis-spring-boot-starter - 2.2.2 + 2.2.2 @@ -123,7 +123,6 @@ nz.net.ultraq.thymeleaf thymeleaf-layout-dialect - 3.1.0 @@ -139,6 +138,7 @@ spring-security-test test + diff --git a/pom_war.xml b/pom_war.xml new file mode 100644 index 0000000..b9fcd7c --- /dev/null +++ b/pom_war.xml @@ -0,0 +1,189 @@ + + + 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/BoardApplication.java b/src/main/java/com/daeucna/board/BoardApplication.java index ce039a5..8370c68 100644 --- a/src/main/java/com/daeucna/board/BoardApplication.java +++ b/src/main/java/com/daeucna/board/BoardApplication.java @@ -2,7 +2,8 @@ package com.daeucna.board; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; @SpringBootApplication public class BoardApplication { @@ -12,3 +13,15 @@ public class BoardApplication { } } + +//war로 deploy시 +//public class BoardApplication extends SpringBootServletInitializer { +// public static void main(String[] args) { +// SpringApplication application = new SpringApplication(BoardApplication.class); +// application.run(args); +// } +// @Override +// protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { +// return application.sources(BoardApplication.class); +// } +//} diff --git a/src/main/java/com/daeucna/board/security/CustomAuthenticationFailureHandler.java b/src/main/java/com/daeucna/board/security/CustomAuthenticationFailureHandler.java index 1727441..c0ad193 100644 --- a/src/main/java/com/daeucna/board/security/CustomAuthenticationFailureHandler.java +++ b/src/main/java/com/daeucna/board/security/CustomAuthenticationFailureHandler.java @@ -18,7 +18,7 @@ public class CustomAuthenticationFailureHandler implements AuthenticationFailure @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { - response.sendRedirect("/login"); + response.sendRedirect(request.getContextPath() + "/"); } } \ No newline at end of file diff --git a/src/main/java/com/daeucna/board/security/CustomAuthenticationSuccessHandler.java b/src/main/java/com/daeucna/board/security/CustomAuthenticationSuccessHandler.java index 700eca3..fda9f32 100644 --- a/src/main/java/com/daeucna/board/security/CustomAuthenticationSuccessHandler.java +++ b/src/main/java/com/daeucna/board/security/CustomAuthenticationSuccessHandler.java @@ -22,7 +22,7 @@ public class CustomAuthenticationSuccessHandler implements AuthenticationSuccess HttpSession session = request.getSession(); session.setMaxInactiveInterval(60); session.setAttribute("authentication", authentication); - response.sendRedirect("/"); + response.sendRedirect(request.getContextPath() + "/"); } } \ No newline at end of file diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..6e471ee --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,21 @@ +spring.datasource.hikari.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy +spring.datasource.hikari.jdbc-url=jdbc:log4jdbc:mariadb://localhost:3306/board?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC +spring.datasource.hikari.username=root +spring.datasource.hikari.password=sangkiham + +# root 로깅 레벨 설정 +logging.level.root=info +# 패키지 단위로 로깅 레벨 설정 +logging.level.com.daeucna.board=debug + +#Server Context-path, port +server.servlet.context-path=/ +server.port=8080 + +#MultipartResolver 설정 +spring.servlet.multipart.location=c:\\board\\temp +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=50MB + +# webapp intro page +spring.webservice.intro=/board/boardList \ No newline at end of file diff --git a/src/main/resources/application-run.properties b/src/main/resources/application-run.properties new file mode 100644 index 0000000..8663c0f --- /dev/null +++ b/src/main/resources/application-run.properties @@ -0,0 +1,21 @@ +spring.datasource.hikari.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy +spring.datasource.hikari.jdbc-url=jdbc:log4jdbc:mariadb://daeuserver2.iptime.org:3306/board?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC +spring.datasource.hikari.username=root +spring.datasource.hikari.password=daeucna + +# root 로깅 레벨 설정 +logging.level.root=info +# 패키지 단위로 로깅 레벨 설정 +logging.level.com.daeucna.board=warn + +#Server Context-path, port +server.servlet.context-path=/ +server.port=8380 + +#MultipartResolver 설정 +#spring.servlet.multipart.location=c:\\board\\temp +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=50MB + +# webapp intro page +spring.webservice.intro=/board/boardList \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 514867f..141787d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,24 +1,5 @@ -spring.datasource.hikari.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy -spring.datasource.hikari.jdbc-url=jdbc:log4jdbc:mariadb://localhost:3306/board?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC -spring.datasource.hikari.username=root -spring.datasource.hikari.password=sangkiham - -# root 로깅 레벨 설정 -logging.level.root=info -# 패키지 단위로 로깅 레벨 설정 -logging.level.com.daeucna.board=debug - # profiles 설정 -spring.profiles.active=local - -#Server Context-path, port -server.servlet.context-path=/ -server.port=8080 - -#MultipartResolver 설정 -spring.servlet.multipart.location=c:\\board\\temp -spring.servlet.multipart.max-file-size=10MB -spring.servlet.multipart.max-request-size=50MB +spring.profiles.active=dev # 정적 리소스에 변화가 있을 때 바로 반영한다. spring.devtools.livereload.enabled=true @@ -29,6 +10,3 @@ spring.thymeleaf.suffix=.html spring.thymeleaf.cache=false # templates 디렉토리에 파일이 있는지 없는지 체크, 없으면 에러를 발생시킨다. spring.thymeleaf.check-template-location=true - -# webapp intro page -spring.webservice.intro=/board/boardList \ No newline at end of file diff --git a/src/main/resources/logback-dev.properties b/src/main/resources/logback-dev.properties new file mode 100644 index 0000000..525cc58 --- /dev/null +++ b/src/main/resources/logback-dev.properties @@ -0,0 +1,2 @@ +log.config.path=d:/logs/local +log.config.filename=local_log \ No newline at end of file diff --git a/src/main/resources/logback-local.properties b/src/main/resources/logback-local.properties deleted file mode 100644 index 525cc58..0000000 --- a/src/main/resources/logback-local.properties +++ /dev/null @@ -1,2 +0,0 @@ -log.config.path=d:/logs/local -log.config.filename=local_log \ No newline at end of file diff --git a/src/main/resources/logback-run.properties b/src/main/resources/logback-run.properties new file mode 100644 index 0000000..525cc58 --- /dev/null +++ b/src/main/resources/logback-run.properties @@ -0,0 +1,2 @@ +log.config.path=d:/logs/local +log.config.filename=local_log \ No newline at end of file diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 241ab72..b2a6bf4 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -2,8 +2,8 @@ - - + + -- libgit2 0.21.4