重构项目
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
wrapperVersion=3.3.4
|
||||||
|
distributionType=only-script
|
||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
|
||||||
@@ -0,0 +1,749 @@
|
|||||||
|
2026-01-12T19:23:51.778+08:00 INFO 24476 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 24476 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:23:51.785+08:00 INFO 24476 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:23:53.169+08:00 INFO 24476 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:23:53.184+08:00 INFO 24476 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:23:53.185+08:00 INFO 24476 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:23:53.244+08:00 INFO 24476 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1381 ms
|
||||||
|
2026-01-12T19:23:53.327+08:00 WARN 24476 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:23:53.331+08:00 INFO 24476 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:23:53.372+08:00 INFO 24476 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:23:53.408+08:00 ERROR 24476 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:25:52.717+08:00 INFO 24120 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 24120 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:25:52.724+08:00 INFO 24120 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:25:54.386+08:00 INFO 24120 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:25:54.401+08:00 INFO 24120 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:25:54.401+08:00 INFO 24120 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:25:54.467+08:00 INFO 24120 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1630 ms
|
||||||
|
2026-01-12T19:25:54.546+08:00 WARN 24120 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:25:54.548+08:00 INFO 24120 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:25:54.580+08:00 INFO 24120 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:25:54.600+08:00 ERROR 24120 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:27:58.523+08:00 INFO 11964 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 11964 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:27:58.530+08:00 INFO 11964 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:28:00.071+08:00 INFO 11964 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:28:00.092+08:00 INFO 11964 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:28:00.093+08:00 INFO 11964 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:28:00.177+08:00 INFO 11964 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1558 ms
|
||||||
|
2026-01-12T19:28:00.285+08:00 WARN 11964 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:28:00.289+08:00 INFO 11964 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:28:00.333+08:00 INFO 11964 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:28:00.362+08:00 ERROR 11964 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:29:07.814+08:00 INFO 8164 --- [lailab-toolbox] [main] c.l.t.LailabToolboxApplicationTests : Starting LailabToolboxApplicationTests using Java 17.0.8 with PID 8164 (started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:29:07.819+08:00 INFO 8164 --- [lailab-toolbox] [main] c.l.t.LailabToolboxApplicationTests : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:29:09.261+08:00 WARN 8164 --- [lailab-toolbox] [main] o.s.w.c.s.GenericWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:29:09.283+08:00 INFO 8164 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:29:09.327+08:00 ERROR 8164 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:29:09.342+08:00 WARN 8164 --- [lailab-toolbox] [main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.web.ServletTestExecutionListener] to prepare test instance [cn.lailab.toolbox.LailabToolboxApplicationTests@30bf26df]
|
||||||
|
|
||||||
|
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@1f992a3a testClass = cn.lailab.toolbox.LailabToolboxApplicationTests, locations = [], classes = [cn.lailab.toolbox.LailabToolboxApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.context.PropertyMappingContextCustomizer@0, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@31e75d13, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@1252b961, org.springframework.boot.test.autoconfigure.OnFailureConditionReportContextCustomizerFactory$OnFailureConditionReportContextCustomizer@51e8e6e6, org.springframework.test.context.support.DynamicPropertiesContextCustomizer@0, org.springframework.boot.webmvc.test.autoconfigure.WebDriverContextCustomizer@50eca7c6, org.springframework.boot.web.server.context.SpringBootTestRandomPortContextCustomizerFactory$Customizer@376a312c, org.springframework.boot.test.context.SpringBootTestAnnotation@4e856d04], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null]
|
||||||
|
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.lambda$loadContext$0(DefaultCacheAwareContextLoaderDelegate.java:195) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.cache.DefaultContextCache.put(DefaultContextCache.java:172) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:160) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:128) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:200) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:139) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:260) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.junit.jupiter.SpringExtension.postProcessTestInstance(SpringExtension.java:205) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$1(ClassBasedTestDescriptor.java:423) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.executeAndMaskThrowable(ClassBasedTestDescriptor.java:428) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeTestInstancePostProcessors$0(ClassBasedTestDescriptor.java:422) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:na]
|
||||||
|
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
|
||||||
|
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[na:na]
|
||||||
|
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
|
||||||
|
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) ~[na:na]
|
||||||
|
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
|
||||||
|
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
|
||||||
|
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:na]
|
||||||
|
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:na]
|
||||||
|
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
|
||||||
|
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[na:na]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstancePostProcessors(ClassBasedTestDescriptor.java:422) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$instantiateAndPostProcessTestInstance$0(ClassBasedTestDescriptor.java:334) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:333) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$1(ClassBasedTestDescriptor.java:322) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at java.base/java.util.Optional.orElseGet(Optional.java:364) ~[na:na]
|
||||||
|
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$0(ClassBasedTestDescriptor.java:321) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:27) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:127) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:126) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:70) ~[junit-jupiter-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$0(NodeTestTask.java:144) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:144) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:110) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58) ~[junit-platform-engine-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58) ~[junit-platform-launcher-6.0.1.jar:6.0.1]
|
||||||
|
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
|
||||||
|
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
|
||||||
|
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
|
||||||
|
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
|
||||||
|
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125) ~[surefire-api-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68) ~[surefire-junit-platform-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54) ~[surefire-junit-platform-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203) ~[surefire-junit-platform-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168) ~[surefire-junit-platform-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136) ~[surefire-junit-platform-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385) ~[surefire-booter-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) ~[surefire-booter-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) ~[surefire-booter-3.5.4.jar:3.5.4]
|
||||||
|
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) ~[surefire-booter-3.5.4.jar:3.5.4]
|
||||||
|
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:766) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:747) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:492) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1446) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1218) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1184) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1121) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:993) ~[spring-context-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:620) ~[spring-context-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$2(SpringBootContextLoader.java:156) ~[spring-boot-test-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58) ~[spring-core-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46) ~[spring-core-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1465) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:605) ~[spring-boot-test-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:156) ~[spring-boot-test-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:115) ~[spring-boot-test-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:247) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.lambda$loadContext$0(DefaultCacheAwareContextLoaderDelegate.java:167) ~[spring-test-7.0.2.jar:7.0.2]
|
||||||
|
... 88 common frames omitted
|
||||||
|
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:766) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:747) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:492) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1446) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:229) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1762) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1651) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:763) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
... 115 common frames omitted
|
||||||
|
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:2297) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1725) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1651) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:763) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
... 129 common frames omitted
|
||||||
|
|
||||||
|
2026-01-12T19:29:59.031+08:00 INFO 20500 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 20500 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:29:59.037+08:00 INFO 20500 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:30:00.352+08:00 INFO 20500 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:30:00.376+08:00 INFO 20500 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:30:00.377+08:00 INFO 20500 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:30:00.434+08:00 INFO 20500 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1324 ms
|
||||||
|
2026-01-12T19:30:00.514+08:00 WARN 20500 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:30:00.517+08:00 INFO 20500 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:30:00.547+08:00 INFO 20500 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:30:00.566+08:00 ERROR 20500 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:35:32.476+08:00 INFO 23072 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 23072 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:35:32.480+08:00 INFO 23072 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:35:33.737+08:00 INFO 23072 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:35:33.757+08:00 INFO 23072 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:35:33.758+08:00 INFO 23072 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:35:33.835+08:00 INFO 23072 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1289 ms
|
||||||
|
2026-01-12T19:35:33.931+08:00 WARN 23072 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authController': Unsatisfied dependency expressed through field 'authService': Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:35:33.935+08:00 INFO 23072 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:35:33.981+08:00 INFO 23072 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:35:34.028+08:00 ERROR 23072 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:40:03.048+08:00 INFO 18912 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 18912 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:40:03.054+08:00 INFO 18912 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:40:04.143+08:00 INFO 18912 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:40:04.156+08:00 INFO 18912 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:40:04.157+08:00 INFO 18912 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:40:04.211+08:00 INFO 18912 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1101 ms
|
||||||
|
2026-01-12T19:40:04.282+08:00 WARN 18912 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'parameterController': Unsatisfied dependency expressed through field 'parameterService': Error creating bean with name 'parameterImpl': Unsatisfied dependency expressed through field 'parameterMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.ParameterMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:40:04.285+08:00 INFO 18912 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:40:04.308+08:00 INFO 18912 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:40:04.324+08:00 ERROR 18912 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field parameterMapper in cn.lailab.toolbox.service.impl.ParameterImpl required a bean of type 'cn.lailab.toolbox.mapper.ParameterMapper' 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 of type 'cn.lailab.toolbox.mapper.ParameterMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:40:33.385+08:00 INFO 8912 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 8912 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:40:33.391+08:00 INFO 8912 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:40:34.624+08:00 INFO 8912 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:40:34.637+08:00 INFO 8912 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:40:34.638+08:00 INFO 8912 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:40:34.699+08:00 INFO 8912 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1240 ms
|
||||||
|
2026-01-12T19:40:34.770+08:00 WARN 8912 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'parameterController': Unsatisfied dependency expressed through field 'parameterService': Error creating bean with name 'parameterImpl': Unsatisfied dependency expressed through field 'parameterMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.ParameterMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:40:34.773+08:00 INFO 8912 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:40:34.797+08:00 INFO 8912 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:40:34.814+08:00 ERROR 8912 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field parameterMapper in cn.lailab.toolbox.service.impl.ParameterImpl required a bean of type 'cn.lailab.toolbox.mapper.ParameterMapper' 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 of type 'cn.lailab.toolbox.mapper.ParameterMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:42:37.514+08:00 INFO 10128 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 10128 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:42:37.520+08:00 INFO 10128 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:42:38.725+08:00 INFO 10128 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:42:38.744+08:00 INFO 10128 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:42:38.744+08:00 INFO 10128 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:42:38.813+08:00 INFO 10128 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1215 ms
|
||||||
|
2026-01-12T19:42:38.950+08:00 INFO 10128 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T19:42:39.482+08:00 INFO 10128 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T19:42:39.488+08:00 INFO 10128 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 2.941 seconds (process running for 3.983)
|
||||||
|
2026-01-12T19:42:44.194+08:00 INFO 10128 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T19:42:44.259+08:00 INFO 10128 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T19:43:11.020+08:00 INFO 12596 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 12596 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:43:11.025+08:00 INFO 12596 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:43:12.232+08:00 INFO 12596 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:43:12.246+08:00 INFO 12596 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:43:12.246+08:00 INFO 12596 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:43:12.309+08:00 INFO 12596 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1214 ms
|
||||||
|
2026-01-12T19:43:12.412+08:00 INFO 12596 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T19:43:12.793+08:00 INFO 12596 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T19:43:12.801+08:00 INFO 12596 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 2.588 seconds (process running for 3.681)
|
||||||
|
2026-01-12T19:43:14.562+08:00 INFO 12596 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T19:43:14.627+08:00 INFO 12596 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T19:44:08.284+08:00 INFO 10436 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 10436 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:44:08.291+08:00 INFO 10436 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:44:09.659+08:00 INFO 10436 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:44:09.676+08:00 INFO 10436 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:44:09.676+08:00 INFO 10436 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:44:09.747+08:00 INFO 10436 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1384 ms
|
||||||
|
2026-01-12T19:44:09.855+08:00 INFO 10436 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T19:44:10.220+08:00 INFO 10436 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T19:44:10.231+08:00 INFO 10436 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 2.862 seconds (process running for 3.907)
|
||||||
|
2026-01-12T19:44:12.209+08:00 INFO 10436 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T19:44:12.278+08:00 INFO 10436 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T19:44:43.629+08:00 INFO 15232 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 15232 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:44:43.633+08:00 INFO 15232 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:44:44.948+08:00 INFO 15232 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:44:44.961+08:00 INFO 15232 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:44:44.962+08:00 INFO 15232 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:44:45.025+08:00 INFO 15232 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1323 ms
|
||||||
|
2026-01-12T19:44:45.099+08:00 WARN 15232 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:44:45.104+08:00 INFO 15232 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:44:45.130+08:00 INFO 15232 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:44:45.149+08:00 ERROR 15232 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:45:01.560+08:00 INFO 14880 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 14880 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:45:01.565+08:00 INFO 14880 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:45:02.815+08:00 INFO 14880 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:45:02.830+08:00 INFO 14880 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:45:02.830+08:00 INFO 14880 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:45:02.891+08:00 INFO 14880 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1252 ms
|
||||||
|
2026-01-12T19:45:02.996+08:00 INFO 14880 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T19:45:03.387+08:00 INFO 14880 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T19:45:03.393+08:00 INFO 14880 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 2.636 seconds (process running for 3.845)
|
||||||
|
2026-01-12T19:45:05.020+08:00 INFO 14880 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T19:45:05.093+08:00 INFO 14880 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T19:45:41.282+08:00 INFO 22172 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 22172 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:45:41.288+08:00 INFO 22172 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:45:42.557+08:00 INFO 22172 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:45:42.572+08:00 INFO 22172 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:45:42.572+08:00 INFO 22172 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:45:42.636+08:00 INFO 22172 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1272 ms
|
||||||
|
2026-01-12T19:45:42.709+08:00 WARN 22172 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:45:42.712+08:00 INFO 22172 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:45:42.739+08:00 INFO 22172 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:45:42.756+08:00 ERROR 22172 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:46:13.727+08:00 INFO 3376 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 3376 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:46:13.733+08:00 INFO 3376 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:46:15.108+08:00 INFO 3376 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:46:15.126+08:00 INFO 3376 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:46:15.127+08:00 INFO 3376 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:46:15.210+08:00 INFO 3376 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1381 ms
|
||||||
|
2026-01-12T19:46:15.355+08:00 INFO 3376 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T19:46:15.762+08:00 INFO 3376 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T19:46:15.769+08:00 INFO 3376 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 3.139 seconds (process running for 4.27)
|
||||||
|
2026-01-12T19:46:20.346+08:00 INFO 3376 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T19:46:20.423+08:00 INFO 3376 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T19:46:28.828+08:00 INFO 25216 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 25216 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:46:28.834+08:00 INFO 25216 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:46:30.114+08:00 INFO 25216 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:46:30.129+08:00 INFO 25216 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:46:30.130+08:00 INFO 25216 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:46:30.188+08:00 INFO 25216 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1279 ms
|
||||||
|
2026-01-12T19:46:30.260+08:00 WARN 25216 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authServiceImpl': Unsatisfied dependency expressed through field 'authMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.AuthMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:46:30.263+08:00 INFO 25216 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:46:30.288+08:00 INFO 25216 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:46:30.305+08:00 ERROR 25216 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field authMapper in cn.lailab.toolbox.service.impl.AuthServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.AuthMapper' 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 of type 'cn.lailab.toolbox.mapper.AuthMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:47:39.868+08:00 INFO 27376 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 27376 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:47:39.873+08:00 INFO 27376 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:47:41.251+08:00 INFO 27376 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:47:41.268+08:00 INFO 27376 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:47:41.269+08:00 INFO 27376 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:47:41.342+08:00 INFO 27376 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1398 ms
|
||||||
|
2026-01-12T19:47:41.445+08:00 WARN 27376 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:47:41.450+08:00 INFO 27376 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:47:41.491+08:00 INFO 27376 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:47:41.520+08:00 ERROR 27376 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field userMapper in cn.lailab.toolbox.service.impl.UserServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.UserMapper' 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 of type 'cn.lailab.toolbox.mapper.UserMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:49:29.101+08:00 INFO 26956 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 26956 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:49:29.106+08:00 INFO 26956 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:49:30.550+08:00 INFO 26956 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:49:30.567+08:00 INFO 26956 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:49:30.568+08:00 INFO 26956 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:49:30.632+08:00 INFO 26956 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1459 ms
|
||||||
|
2026-01-12T19:49:30.742+08:00 WARN 26956 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:49:30.748+08:00 INFO 26956 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:49:30.813+08:00 INFO 26956 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:49:30.840+08:00 ERROR 26956 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field userMapper in cn.lailab.toolbox.service.impl.UserServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.UserMapper' 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 of type 'cn.lailab.toolbox.mapper.UserMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:51:49.976+08:00 INFO 19252 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 19252 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:51:49.982+08:00 INFO 19252 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:51:51.265+08:00 INFO 19252 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:51:51.280+08:00 INFO 19252 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:51:51.281+08:00 INFO 19252 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:51:51.342+08:00 INFO 19252 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1290 ms
|
||||||
|
2026-01-12T19:51:51.415+08:00 WARN 19252 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:51:51.418+08:00 INFO 19252 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:51:51.452+08:00 INFO 19252 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:51:51.473+08:00 ERROR 19252 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field userMapper in cn.lailab.toolbox.service.impl.UserServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.UserMapper' 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 of type 'cn.lailab.toolbox.mapper.UserMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:52:07.643+08:00 INFO 26592 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 26592 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:52:07.650+08:00 INFO 26592 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:52:09.732+08:00 INFO 26592 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:52:09.748+08:00 INFO 26592 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:52:09.749+08:00 INFO 26592 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:52:09.828+08:00 INFO 26592 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 2043 ms
|
||||||
|
2026-01-12T19:52:09.919+08:00 WARN 26592 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper': No qualifying bean of type 'cn.lailab.toolbox.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
|
||||||
|
2026-01-12T19:52:09.923+08:00 INFO 26592 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:52:09.963+08:00 INFO 26592 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:52:09.995+08:00 ERROR 26592 --- [lailab-toolbox] [main] o.s.b.d.LoggingFailureAnalysisReporter :
|
||||||
|
|
||||||
|
***************************
|
||||||
|
APPLICATION FAILED TO START
|
||||||
|
***************************
|
||||||
|
|
||||||
|
Description:
|
||||||
|
|
||||||
|
Field userMapper in cn.lailab.toolbox.service.impl.UserServiceImpl required a bean of type 'cn.lailab.toolbox.mapper.UserMapper' 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 of type 'cn.lailab.toolbox.mapper.UserMapper' in your configuration.
|
||||||
|
|
||||||
|
2026-01-12T19:53:50.930+08:00 INFO 3004 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 3004 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T19:53:50.937+08:00 INFO 3004 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T19:53:52.359+08:00 INFO 3004 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T19:53:52.376+08:00 INFO 3004 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T19:53:52.376+08:00 INFO 3004 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T19:53:52.435+08:00 INFO 3004 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1387 ms
|
||||||
|
2026-01-12T19:53:52.520+08:00 WARN 3004 --- [lailab-toolbox] [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper': Error creating bean with name 'userMapper' defined in file [D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes\cn\lailab\toolbox\mapper\UserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
|
||||||
|
2026-01-12T19:53:52.523+08:00 INFO 3004 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
|
||||||
|
2026-01-12T19:53:52.557+08:00 INFO 3004 --- [lailab-toolbox] [main] .s.b.a.l.ConditionEvaluationReportLogger :
|
||||||
|
|
||||||
|
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
|
||||||
|
2026-01-12T19:53:52.578+08:00 ERROR 3004 --- [lailab-toolbox] [main] o.s.boot.SpringApplication : Application run failed
|
||||||
|
|
||||||
|
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper': Error creating bean with name 'userMapper' defined in file [D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes\cn\lailab\toolbox\mapper\UserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:766) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:747) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:492) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1446) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1218) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1184) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1121) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:993) ~[spring-context-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:620) ~[spring-context-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-web-server-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-4.0.1.jar:4.0.1]
|
||||||
|
at cn.lailab.toolbox.LailabToolboxApplication.main(LailabToolboxApplication.java:14) ~[classes/:na]
|
||||||
|
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userMapper' defined in file [D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes\cn\lailab\toolbox\mapper\UserMapper.class]: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1817) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:1225) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1704) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1651) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:763) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
... 22 common frames omitted
|
||||||
|
Caused by: java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
|
||||||
|
at org.springframework.util.Assert.notNull(Assert.java:182) ~[spring-core-7.0.2.jar:7.0.2]
|
||||||
|
at org.mybatis.spring.support.SqlSessionDaoSupport.checkDaoConfig(SqlSessionDaoSupport.java:123) ~[mybatis-spring-2.0.0.jar:2.0.0]
|
||||||
|
at org.mybatis.spring.mapper.MapperFactoryBean.checkDaoConfig(MapperFactoryBean.java:73) ~[mybatis-spring-2.0.0.jar:2.0.0]
|
||||||
|
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:46) ~[spring-tx-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1864) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1813) ~[spring-beans-7.0.2.jar:7.0.2]
|
||||||
|
... 32 common frames omitted
|
||||||
|
|
||||||
|
2026-01-12T20:01:40.656+08:00 INFO 19164 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 19164 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T20:01:40.660+08:00 INFO 19164 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T20:01:41.944+08:00 INFO 19164 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T20:01:41.960+08:00 INFO 19164 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T20:01:41.960+08:00 INFO 19164 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T20:01:42.009+08:00 INFO 19164 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1276 ms
|
||||||
|
2026-01-12T20:01:42.454+08:00 INFO 19164 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T20:01:42.801+08:00 INFO 19164 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T20:01:42.809+08:00 INFO 19164 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 2.915 seconds (process running for 3.995)
|
||||||
|
2026-01-12T20:02:17.485+08:00 INFO 19164 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T20:02:17.541+08:00 INFO 19164 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T20:02:24.506+08:00 INFO 18292 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 18292 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T20:02:24.513+08:00 INFO 18292 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T20:02:25.976+08:00 INFO 18292 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T20:02:25.990+08:00 INFO 18292 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T20:02:25.990+08:00 INFO 18292 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T20:02:26.042+08:00 INFO 18292 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1422 ms
|
||||||
|
2026-01-12T20:02:26.494+08:00 INFO 18292 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T20:02:26.923+08:00 INFO 18292 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T20:02:26.931+08:00 INFO 18292 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 3.332 seconds (process running for 4.348)
|
||||||
|
2026-01-12T20:03:04.143+08:00 INFO 18292 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T20:03:04.207+08:00 INFO 18292 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T20:03:12.992+08:00 INFO 27192 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 27192 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T20:03:12.996+08:00 INFO 27192 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T20:03:14.352+08:00 INFO 27192 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T20:03:14.366+08:00 INFO 27192 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T20:03:14.367+08:00 INFO 27192 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T20:03:14.417+08:00 INFO 27192 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1338 ms
|
||||||
|
2026-01-12T20:03:14.906+08:00 INFO 27192 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T20:03:15.247+08:00 INFO 27192 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T20:03:15.253+08:00 INFO 27192 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 3.153 seconds (process running for 4.258)
|
||||||
|
2026-01-12T20:03:47.804+08:00 INFO 27192 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T20:03:47.895+08:00 INFO 27192 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T20:04:03.375+08:00 INFO 27464 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 27464 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T20:04:03.382+08:00 INFO 27464 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T20:04:04.755+08:00 INFO 27464 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T20:04:04.771+08:00 INFO 27464 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T20:04:04.771+08:00 INFO 27464 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T20:04:04.829+08:00 INFO 27464 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1361 ms
|
||||||
|
2026-01-12T20:04:05.257+08:00 INFO 27464 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T20:04:05.583+08:00 INFO 27464 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T20:04:05.592+08:00 INFO 27464 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 2.905 seconds (process running for 3.838)
|
||||||
|
2026-01-12T20:04:16.449+08:00 INFO 27464 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T20:04:16.511+08:00 INFO 27464 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
|
2026-01-12T20:04:23.801+08:00 INFO 7000 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Starting LailabToolboxApplication using Java 17.0.8 with PID 7000 (D:\WorkSpace\IdeaProject\lailab-toolbox\target\classes started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T20:04:23.808+08:00 INFO 7000 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T20:04:25.381+08:00 INFO 7000 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)
|
||||||
|
2026-01-12T20:04:25.398+08:00 INFO 7000 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
|
||||||
|
2026-01-12T20:04:25.398+08:00 INFO 7000 --- [lailab-toolbox] [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/11.0.15]
|
||||||
|
2026-01-12T20:04:25.490+08:00 INFO 7000 --- [lailab-toolbox] [main] b.w.c.s.WebApplicationContextInitializer : Root WebApplicationContext: initialization completed in 1611 ms
|
||||||
|
2026-01-12T20:04:25.996+08:00 INFO 7000 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T20:04:26.386+08:00 INFO 7000 --- [lailab-toolbox] [main] o.s.boot.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
|
||||||
|
2026-01-12T20:04:26.404+08:00 INFO 7000 --- [lailab-toolbox] [main] c.l.toolbox.LailabToolboxApplication : Started LailabToolboxApplication in 3.444 seconds (process running for 4.434)
|
||||||
|
2026-01-12T20:04:41.722+08:00 INFO 23776 --- [lailab-toolbox] [main] c.l.t.LailabToolboxApplicationTests : Starting LailabToolboxApplicationTests using Java 17.0.8 with PID 23776 (started by Qian in D:\WorkSpace\IdeaProject\lailab-toolbox)
|
||||||
|
2026-01-12T20:04:41.724+08:00 INFO 23776 --- [lailab-toolbox] [main] c.l.t.LailabToolboxApplicationTests : The following 1 profile is active: "pro"
|
||||||
|
2026-01-12T20:04:43.517+08:00 INFO 23776 --- [lailab-toolbox] [main] o.s.b.w.a.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
|
||||||
|
2026-01-12T20:04:44.042+08:00 INFO 23776 --- [lailab-toolbox] [main] c.l.t.LailabToolboxApplicationTests : Started LailabToolboxApplicationTests in 2.835 seconds (process running for 4.779)
|
||||||
|
2026-01-12T20:06:48.907+08:00 INFO 7000 --- [lailab-toolbox] [SpringApplicationShutdownHook] o.s.boot.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
|
||||||
|
2026-01-12T20:06:48.962+08:00 INFO 7000 --- [lailab-toolbox] [tomcat-shutdown] o.s.boot.tomcat.GracefulShutdown : Graceful shutdown complete
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>4.0.1</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<groupId>cn.lailab.toolbox</groupId>
|
||||||
|
<artifactId>lailab-toolbox</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>lailab-toolbox</name>
|
||||||
|
<description>lailab-toolbox</description>
|
||||||
|
<url/>
|
||||||
|
<licenses>
|
||||||
|
<license/>
|
||||||
|
</licenses>
|
||||||
|
<developers>
|
||||||
|
<developer/>
|
||||||
|
</developers>
|
||||||
|
<scm>
|
||||||
|
<connection/>
|
||||||
|
<developerConnection/>
|
||||||
|
<tag/>
|
||||||
|
<url/>
|
||||||
|
</scm>
|
||||||
|
<properties>
|
||||||
|
<java.version>17</java.version>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-webmvc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-webmvc-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--引入HuTools工具依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.8.40</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--引入druid数据源-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid</artifactId>
|
||||||
|
<version>1.2.8</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!--引入mybatis-plus-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
|
<version>4.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
<artifactId>mybatis-spring-boot-starter-test</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>annotationProcessor</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>1.2.12</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<excludes>
|
||||||
|
<exclude>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</exclude>
|
||||||
|
</excludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package cn.lailab.toolbox;
|
||||||
|
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
//@MapperScan("cn.lailab.toolbox.mapper") // 扫描这个包下的所有Mapper接口
|
||||||
|
@EnableScheduling
|
||||||
|
public class LailabToolboxApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(LailabToolboxApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package cn.lailab.toolbox.beans.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Auth {
|
||||||
|
private int id;
|
||||||
|
private String code = "";
|
||||||
|
private String md5code = "";
|
||||||
|
private String type = "";
|
||||||
|
private int useCount = 0;
|
||||||
|
private Date createTime = null;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package cn.lailab.toolbox.beans.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Parameter {
|
||||||
|
private int id;//参数ID
|
||||||
|
private int sortId;//排序号
|
||||||
|
private int isSystem;//是否系统参数(0-用户参数 1-系统参数)
|
||||||
|
private String category;//分类分组
|
||||||
|
private String type;//参数类型: string, number, boolean, json, text
|
||||||
|
private String parameterName = "";//参数名称
|
||||||
|
private String parameterValue;//参数值
|
||||||
|
private String description ;//参数描述
|
||||||
|
private int status;//状态: 0-禁用 1-启用
|
||||||
|
private String createUser;//创建人
|
||||||
|
private Date createTime;//创建时间
|
||||||
|
private String updateUser;//更新人
|
||||||
|
private Date updateTime ;//更新时间
|
||||||
|
private String authCode = "";
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package cn.lailab.toolbox.beans.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class User {
|
||||||
|
private int id;
|
||||||
|
// private String username;
|
||||||
|
// private String password;
|
||||||
|
// private String nickName;
|
||||||
|
// private int gender;
|
||||||
|
// private String country;
|
||||||
|
// private String province;
|
||||||
|
// private String city;
|
||||||
|
// private String avatarUrl;
|
||||||
|
// private String openId;
|
||||||
|
// private String phone;
|
||||||
|
// private String email;
|
||||||
|
// private Date createTime = null;
|
||||||
|
// private String creator;
|
||||||
|
// private int source;
|
||||||
|
// private int status;
|
||||||
|
// private String authCode;
|
||||||
|
private String username ;
|
||||||
|
private String password;
|
||||||
|
private String nickName;
|
||||||
|
private int gender;
|
||||||
|
private String country;
|
||||||
|
private String province;
|
||||||
|
private String city;
|
||||||
|
private String avatarUrl;
|
||||||
|
private String openId;
|
||||||
|
private String phone;
|
||||||
|
private String email;
|
||||||
|
private Date createTime;
|
||||||
|
private String creator;
|
||||||
|
private int source;
|
||||||
|
private int status;
|
||||||
|
private String authCode;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package cn.lailab.toolbox.beans.message;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Result {
|
||||||
|
private int code;
|
||||||
|
private String message;
|
||||||
|
private Object data;
|
||||||
|
private Long timestamp;
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package cn.lailab.toolbox.controller;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
import cn.lailab.toolbox.service.impl.AuthServiceImpl;
|
||||||
|
import cn.lailab.toolbox.service.impl.ResultServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class AuthController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
AuthServiceImpl authService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ResultServiceImpl resultService;
|
||||||
|
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(AuthController.class);
|
||||||
|
|
||||||
|
@RequestMapping("/api/auth/getAuthCode")
|
||||||
|
public String getAuthCode(@RequestBody User user) {
|
||||||
|
String rst;
|
||||||
|
logger.info("调用方法getAuthCode()开始 入参:{}", user);
|
||||||
|
String code = authService.getAuthCode(user);
|
||||||
|
if (code == null|| code.isEmpty()) {
|
||||||
|
rst = resultService.error("获取授权码失败,请确认登录信息无误!","");
|
||||||
|
}else{
|
||||||
|
rst = resultService.success("获取授权码成功!",code);
|
||||||
|
}
|
||||||
|
logger.info("调用方法getAuthCode()结束 返回:{}", code);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/auth/getAuthMd5Code")
|
||||||
|
public String getAuthMd5Code(@RequestBody User user) {
|
||||||
|
String rst;
|
||||||
|
logger.info("调用方法getAuthMd5Code()开始 入参:{}", user);
|
||||||
|
String code = authService.getAuthMd5Code(user);
|
||||||
|
if (code == null|| code.isEmpty()) {
|
||||||
|
rst = resultService.error("获取授权码失败,请确认登录信息无误!","");
|
||||||
|
}else{
|
||||||
|
rst = resultService.success("获取授权码成功!",code);
|
||||||
|
}
|
||||||
|
logger.info("调用方法getAuthMd5Code()结束 返回:{}", code);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package cn.lailab.toolbox.controller;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.Parameter;
|
||||||
|
import cn.lailab.toolbox.service.ParameterService;
|
||||||
|
import cn.lailab.toolbox.service.ResultService;
|
||||||
|
import cn.lailab.toolbox.service.impl.AuthServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class ParameterController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ParameterService parameterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AuthServiceImpl authService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ResultService resultService;
|
||||||
|
|
||||||
|
@Value("${lailab.default-authCode}")
|
||||||
|
String defaultAuthCode;
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(UserController.class);
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/api/parameter/getAllParameter")
|
||||||
|
public String getAllParameter(@RequestBody Parameter parameter) {
|
||||||
|
logger.info("调用方法getAllParameter()开始 入参:{}", parameter);
|
||||||
|
String rst;
|
||||||
|
if(this.checkAuth(parameter.getAuthCode())){
|
||||||
|
List<Parameter> parameters = parameterService.getAllParameter(parameter);
|
||||||
|
if(!parameters.isEmpty()) {
|
||||||
|
rst = resultService.success("获取所有参数信息成功!", parameters);
|
||||||
|
} else {
|
||||||
|
rst = resultService.success("获取所有参数信息失败!", "");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法getAllParameter()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/api/parameter/getParameterByName")
|
||||||
|
@ResponseBody
|
||||||
|
public String getParameterByName(@RequestBody Parameter parameter){
|
||||||
|
logger.info("调用方法getParameterByName()开始 入参:{}", parameter);
|
||||||
|
String parameterName = parameter.getParameterName();
|
||||||
|
String rst;
|
||||||
|
if(parameterName == null|| parameterName.isEmpty()){
|
||||||
|
rst = resultService.error("参数parameterName不存在,请检查入参!");
|
||||||
|
}else {
|
||||||
|
if(this.checkAuth(parameter.getAuthCode())){
|
||||||
|
Parameter rstParameter = parameterService.getParameterByName(parameter);
|
||||||
|
if (rstParameter == null) {
|
||||||
|
rst = resultService.error("未获取参数信息!", "");
|
||||||
|
} else {
|
||||||
|
rst = resultService.success("获取参数信息成功!", rstParameter);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("调用方法getParameterByName()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkAuth(String auth_code){
|
||||||
|
logger.info("调用方法checkAuth()开始 入参:{}",auth_code);
|
||||||
|
String auth_new = authService.getAuthMd5CodeInside();
|
||||||
|
logger.info("最新授权码 {}",auth_new);
|
||||||
|
authService.addUseCount(auth_new);
|
||||||
|
logger.info("授权码 {} 使用次数加1",auth_new);
|
||||||
|
boolean is_match = auth_new.equals(auth_code)||defaultAuthCode.equals(auth_code);
|
||||||
|
logger.info("调用方法checkAuth()结束 返回:{}",is_match);
|
||||||
|
return is_match;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package cn.lailab.toolbox.controller;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class ToolController {
|
||||||
|
|
||||||
|
@RequestMapping("/JiSuanQi")
|
||||||
|
public String JiSuanQi(){
|
||||||
|
return "tools/JiSuanQi.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
package cn.lailab.toolbox.controller;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
import cn.lailab.toolbox.service.impl.AuthServiceImpl;
|
||||||
|
import cn.lailab.toolbox.service.impl.ResultServiceImpl;
|
||||||
|
import cn.lailab.toolbox.service.impl.UserServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class UserController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
UserServiceImpl userService ;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ResultServiceImpl resultService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
AuthServiceImpl authService;
|
||||||
|
@Value("${lailab.default-authCode}")
|
||||||
|
String defaultAuthCode;
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(UserController.class);
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/getAllUser")
|
||||||
|
@ResponseBody
|
||||||
|
public String getAllUser(@RequestBody User user) {
|
||||||
|
String rst;
|
||||||
|
logger.info("调用方法getAllUser()开始 入参:{}", user);
|
||||||
|
if(this.checkAuth(user.getAuthCode())){
|
||||||
|
List<User> users = userService.getAllUser(user);
|
||||||
|
if(!users.isEmpty()) {
|
||||||
|
rst = resultService.success("获取所有用户信息成功!", users);
|
||||||
|
}else{
|
||||||
|
rst = resultService.error("获取所有用户信息失败!", "");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法getAllUser()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/getUserByOpenId")
|
||||||
|
@ResponseBody
|
||||||
|
public String getUserByOpenId(@RequestBody User user){
|
||||||
|
logger.info("调用方法getUserByOpenId()开始 入参:{}", user);
|
||||||
|
String openId = user.getOpenId();
|
||||||
|
String rst;
|
||||||
|
if(openId == null|| openId.isEmpty()){
|
||||||
|
rst = resultService.error("参数code不存在,请检查入参!");
|
||||||
|
}else {
|
||||||
|
if(this.checkAuth(user.getAuthCode())){
|
||||||
|
User rstUser = userService.getUserByOpenId(user);
|
||||||
|
if (rstUser == null) {
|
||||||
|
rst = resultService.error("未获取用户信息!", "");
|
||||||
|
} else {
|
||||||
|
rst = resultService.success("获取用户信息成功!", rstUser);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
logger.info("调用方法getUserByOpenId()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/addUser")
|
||||||
|
public String addUser(@RequestBody User user){
|
||||||
|
logger.info("调用方法addUser()开始 入参:{}",user);
|
||||||
|
logger.info("1.检测用户是否存在(addUser)");
|
||||||
|
int exist = userService.userExist(user);
|
||||||
|
String rst;
|
||||||
|
if(exist>0) {
|
||||||
|
logger.info("2.用户已存在,不能新建用户(addUser)");
|
||||||
|
rst = resultService.other(-2,"用户已存在!","");
|
||||||
|
}else{
|
||||||
|
logger.info("2.用户不存在,新建用户(addUser)");
|
||||||
|
int code = userService.addUser(user);
|
||||||
|
if (code > 0) {
|
||||||
|
rst = resultService.success("添加用户信息成功!");
|
||||||
|
} else {
|
||||||
|
rst = resultService.error("添加用户信息失败!");
|
||||||
|
}
|
||||||
|
logger.info("调用方法addUser()结束 返回:{}", rst);
|
||||||
|
}
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/login")
|
||||||
|
public String login(@RequestBody User user){
|
||||||
|
logger.info("调用方法login()开始 入参:{}",user);
|
||||||
|
String rst;
|
||||||
|
if(this.checkAuth(user.getAuthCode())) {
|
||||||
|
logger.info("1.检测用户是否存在(login)");
|
||||||
|
int exist = userService.userExist(user);
|
||||||
|
if (exist > 0) {
|
||||||
|
// 1.获取用户输入密码
|
||||||
|
String str_pwd = user.getPassword();
|
||||||
|
// 2.将密码MD5加密
|
||||||
|
str_pwd = SecureUtil.md5(str_pwd);
|
||||||
|
// 3.转换为大写字符
|
||||||
|
str_pwd = str_pwd.toUpperCase();
|
||||||
|
user.setPassword(str_pwd);
|
||||||
|
logger.info("2.用户存在,校验密码(login)");
|
||||||
|
User rstUser = userService.login(user);
|
||||||
|
if (rstUser == null) {
|
||||||
|
rst = resultService.error("登录失败,请检查密码是否正确!");
|
||||||
|
} else {
|
||||||
|
rst = resultService.success("登录成功!", rstUser);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.info("2.用户不存在,需要注册(login)");
|
||||||
|
rst = resultService.other(-2, "用户不存在,请进行注册!", "");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法login()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/loginByOpenId")
|
||||||
|
public String loginByOpenId(@RequestBody User user){
|
||||||
|
logger.info("loginByOpenId()开始 入参:{}",user);
|
||||||
|
if (user.getOpenId() == null || user.getOpenId().trim().isEmpty()) {
|
||||||
|
logger.info("参数OpenId不存在,请检查入参!");
|
||||||
|
return resultService.error("参数OpenId不存在,请检查入参!");
|
||||||
|
}
|
||||||
|
String rst;
|
||||||
|
if(this.checkAuth(user.getAuthCode())) {
|
||||||
|
User rstUser = userService.loginByOpenId(user);
|
||||||
|
if (rstUser == null) {
|
||||||
|
rst = resultService.error("登录失败!");
|
||||||
|
} else {
|
||||||
|
rst = resultService.success("登录成功!", rstUser);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法loginByOpenId()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/updateUser")
|
||||||
|
public String updateUser(@RequestBody User user){
|
||||||
|
logger.info("调用方法updateUser()开始 入参:{}",user);
|
||||||
|
String rst;
|
||||||
|
if(this.checkAuth(user.getAuthCode())) {
|
||||||
|
int code = userService.updateUser(user);
|
||||||
|
if (code > 0) {
|
||||||
|
rst = resultService.success("修改用户信息成功!");
|
||||||
|
} else {
|
||||||
|
rst = resultService.error("修改用户信息失败!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法updateUser()结束 返回:{}", rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/deleteUser")
|
||||||
|
public String deleteUser(@RequestBody User user){
|
||||||
|
logger.info("调用方法deleteUser()开始 入参:{}",user);
|
||||||
|
String rst;
|
||||||
|
if(this.checkAuth(user.getAuthCode())) {
|
||||||
|
logger.info("1.检测用户是否存在(deleteUser)");
|
||||||
|
int exist = userService.userExist(user);
|
||||||
|
if (exist > 0) {
|
||||||
|
logger.info("2.用户存在(deleteUser)");
|
||||||
|
int code = userService.deleteUser(user);
|
||||||
|
if (code > 0) {
|
||||||
|
rst = resultService.success("删除用户成功!");
|
||||||
|
} else {
|
||||||
|
rst = resultService.error("删除用户失败!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
logger.info("2.用户不存在(deleteUser)");
|
||||||
|
rst = resultService.error("用户不存在!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法deleteUser()结束 返回:{}",rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/api/user/deleteUserByOpenId")
|
||||||
|
public String deleteUserByOpenId(@RequestBody User user){
|
||||||
|
logger.info("调用方法deleteUserByOpenId()开始 入参:{}",user);
|
||||||
|
String rst;
|
||||||
|
if(this.checkAuth(user.getAuthCode())) {
|
||||||
|
int code = userService.deleteUserByOpenId(user);
|
||||||
|
if (code > 0) {
|
||||||
|
rst = resultService.success("删除用户成功!");
|
||||||
|
} else {
|
||||||
|
rst = resultService.error("删除用户失败!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
rst = resultService.other(-2,"授权信息有误或已过期,请更换后重新尝试!","");
|
||||||
|
}
|
||||||
|
logger.info("调用方法deleteUserByOpenId()结束 返回:{}",rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean checkAuth(String auth_code){
|
||||||
|
logger.info("调用方法checkAuth()开始 入参:{}",auth_code);
|
||||||
|
String auth_new = authService.getAuthMd5CodeInside();
|
||||||
|
logger.info("最新授权码 {}",auth_new);
|
||||||
|
authService.addUseCount(auth_new);
|
||||||
|
logger.info("授权码 {} 使用次数加1",auth_new);
|
||||||
|
boolean is_match = auth_new.equals(auth_code)||defaultAuthCode.equals(auth_code);
|
||||||
|
logger.info("调用方法checkAuth()结束 返回:{}",is_match);
|
||||||
|
return is_match;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package cn.lailab.toolbox.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.CharsetUtil;
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import cn.lailab.toolbox.service.impl.ResultServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class WXController {
|
||||||
|
// 获取小程序AppID
|
||||||
|
@Value("${mini-program.appid}")
|
||||||
|
private String appid;
|
||||||
|
// 获取小程序Secrty
|
||||||
|
@Value("${mini-program.secret}")
|
||||||
|
private String secret;
|
||||||
|
// 返回消息类
|
||||||
|
@Autowired
|
||||||
|
ResultServiceImpl resultService;
|
||||||
|
// 定义日志打印类
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(WXController.class);
|
||||||
|
// 获取微信OpenId
|
||||||
|
@RequestMapping("/api/wx/getOpenId")
|
||||||
|
@ResponseBody
|
||||||
|
public String getOpenId(@RequestParam(required=false,name = "code") String code) {
|
||||||
|
logger.info("调用方法getOpenId()开始 {}",code);
|
||||||
|
// 拼接所需字符串
|
||||||
|
String url = "https://api.weixin.qq.com/sns/jscode2session" +
|
||||||
|
"?appid=" +appid +
|
||||||
|
"&secret=" + secret + //自己的appSecret
|
||||||
|
"&js_code=" + code +
|
||||||
|
"&grant_type=authorization_code" +
|
||||||
|
"&connect_redirect=1";
|
||||||
|
|
||||||
|
if (code == null || code.trim().isEmpty()) {
|
||||||
|
logger.error("参数code不存在,请检查入参!");
|
||||||
|
return resultService.error("参数code不存在,请检查入参!");
|
||||||
|
}
|
||||||
|
String result = HttpUtil.get(url, CharsetUtil.CHARSET_UTF_8);
|
||||||
|
String rst = resultService.success("调用完成",result);
|
||||||
|
logger.info("调用方法getOpenId()结束 {}",rst);
|
||||||
|
return rst;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package cn.lailab.toolbox.mapper;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.Auth;
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AuthMapper {
|
||||||
|
|
||||||
|
String getAuthCode(User user);
|
||||||
|
String getAuthMd5Code(User user);
|
||||||
|
String getAuthMd5CodeInside();
|
||||||
|
int addUseCount(String authCode);
|
||||||
|
int addAuth(Auth auth);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package cn.lailab.toolbox.mapper;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.Parameter;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ParameterMapper {
|
||||||
|
List<Parameter> getAllParameter(Parameter parameter);
|
||||||
|
Parameter getParameterByName(Parameter parameter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package cn.lailab.toolbox.mapper;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface UserMapper {
|
||||||
|
|
||||||
|
int addUser(User user);
|
||||||
|
|
||||||
|
User getUserByOpenId(User user);
|
||||||
|
|
||||||
|
List<User> getAllUser(User user);
|
||||||
|
|
||||||
|
int userExist(User user);
|
||||||
|
|
||||||
|
User login(User user);
|
||||||
|
|
||||||
|
User loginByOpenId(User user);
|
||||||
|
|
||||||
|
int updateUser(User user);
|
||||||
|
|
||||||
|
int deleteUser(User user);
|
||||||
|
|
||||||
|
int deleteUserByOpenId(User user);
|
||||||
|
|
||||||
|
int getMaxId();
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package cn.lailab.toolbox.service;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.Auth;
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
|
||||||
|
public interface AuthService {
|
||||||
|
String getAuthCode(User user);
|
||||||
|
String getAuthMd5Code(User user);
|
||||||
|
String getAuthMd5CodeInside();
|
||||||
|
int addUseCount(String auth_code);
|
||||||
|
int addAuth(Auth auth);
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package cn.lailab.toolbox.service;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.Parameter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ParameterService {
|
||||||
|
List<Parameter> getAllParameter(Parameter parameter);
|
||||||
|
Parameter getParameterByName(Parameter parameter);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package cn.lailab.toolbox.service;
|
||||||
|
|
||||||
|
public interface ResultService {
|
||||||
|
|
||||||
|
String success();
|
||||||
|
String success(String message);
|
||||||
|
String success(String message,Object data);
|
||||||
|
String error();
|
||||||
|
String error(String message);
|
||||||
|
String error(String message,Object data);
|
||||||
|
String other(int code,String message,Object data);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package cn.lailab.toolbox.service;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface UserService {
|
||||||
|
int addUser(User user);
|
||||||
|
|
||||||
|
List<User> getAllUser(User user);
|
||||||
|
|
||||||
|
User getUserByOpenId(User user);
|
||||||
|
|
||||||
|
int userExist(User user);
|
||||||
|
|
||||||
|
User login(User user);
|
||||||
|
|
||||||
|
User loginByOpenId(User user);
|
||||||
|
|
||||||
|
int updateUser(User user);
|
||||||
|
|
||||||
|
int deleteUser(User user);
|
||||||
|
|
||||||
|
int deleteUserByOpenId(User user);
|
||||||
|
|
||||||
|
int getMaxId();
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package cn.lailab.toolbox.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.lailab.toolbox.beans.domain.Auth;
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
import cn.lailab.toolbox.mapper.AuthMapper;
|
||||||
|
import cn.lailab.toolbox.service.AuthService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class AuthServiceImpl implements AuthService {
|
||||||
|
|
||||||
|
// 自动注入AuthMapper
|
||||||
|
@Autowired
|
||||||
|
AuthMapper authMapper;
|
||||||
|
|
||||||
|
// 获取最新授权码
|
||||||
|
@Override
|
||||||
|
public String getAuthCode(User user) {
|
||||||
|
String str_pwd = user.getPassword();
|
||||||
|
String str_pwd_md5 = SecureUtil.md5(str_pwd).toUpperCase();
|
||||||
|
user.setPassword(str_pwd_md5);
|
||||||
|
return authMapper.getAuthCode(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取最新MD5授权码
|
||||||
|
@Override
|
||||||
|
public String getAuthMd5Code(User user) {
|
||||||
|
String str_pwd = user.getPassword();
|
||||||
|
String str_pwd_md5 = SecureUtil.md5(str_pwd).toUpperCase();
|
||||||
|
user.setPassword(str_pwd_md5);
|
||||||
|
return authMapper.getAuthMd5Code(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAuthMd5CodeInside() {
|
||||||
|
return authMapper.getAuthMd5CodeInside();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addUseCount(String auth_code) {
|
||||||
|
return authMapper.addUseCount(auth_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addAuth(Auth auth) {
|
||||||
|
return authMapper.addAuth(auth);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package cn.lailab.toolbox.service.impl;
|
||||||
|
|
||||||
|
import cn.lailab.toolbox.beans.domain.Parameter;
|
||||||
|
import cn.lailab.toolbox.mapper.ParameterMapper;
|
||||||
|
import cn.lailab.toolbox.service.ParameterService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ParameterImpl implements ParameterService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ParameterMapper parameterMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Parameter> getAllParameter(Parameter parameter) {
|
||||||
|
return parameterMapper.getAllParameter(parameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Parameter getParameterByName(Parameter parameter) {
|
||||||
|
return parameterMapper.getParameterByName(parameter);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package cn.lailab.toolbox.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import cn.lailab.toolbox.beans.message.Result;
|
||||||
|
import cn.lailab.toolbox.service.ResultService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ResultServiceImpl implements ResultService {
|
||||||
|
@Override
|
||||||
|
public String other(int code, String message, Object data) {
|
||||||
|
Result result = new Result();
|
||||||
|
result.setCode(code);
|
||||||
|
result.setMessage(message);
|
||||||
|
if(data == null) result.setData("");
|
||||||
|
result.setData(data);
|
||||||
|
result.setTimestamp(System.currentTimeMillis());
|
||||||
|
//return JSONUtil.toJsonPrettyStr(result);
|
||||||
|
return JSONUtil.toJsonStr(result);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String success() {
|
||||||
|
return other(0,"success","");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String success(String message) {
|
||||||
|
return other(0,message,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String success(String message, Object data) {
|
||||||
|
return other(0,message,data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String error() {
|
||||||
|
return other(-1,"error","");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String error(String message) {
|
||||||
|
return other(-1,message,"");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String error(String message, Object data) {
|
||||||
|
return other(-1,message,data);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package cn.lailab.toolbox.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.lailab.toolbox.beans.domain.User;
|
||||||
|
import cn.lailab.toolbox.mapper.UserMapper;
|
||||||
|
import cn.lailab.toolbox.service.UserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class UserServiceImpl implements UserService {
|
||||||
|
|
||||||
|
// 自动注入UserMapper
|
||||||
|
@Autowired
|
||||||
|
UserMapper userMapper;
|
||||||
|
|
||||||
|
// 引入默认密码
|
||||||
|
@Value("${lailab.default-password}")
|
||||||
|
private String defaultPassword;
|
||||||
|
|
||||||
|
// 增加用户
|
||||||
|
@Override
|
||||||
|
public int addUser(User user) {
|
||||||
|
int maxId;
|
||||||
|
maxId = userMapper.getMaxId();
|
||||||
|
maxId +=1;
|
||||||
|
// 自动生成用户名
|
||||||
|
if(user.getUsername().isEmpty()){
|
||||||
|
user.setUsername(String.format("%05d",maxId));
|
||||||
|
}
|
||||||
|
// 对用户输入的密码进行MD5加密
|
||||||
|
if(user.getPassword().isEmpty()) {
|
||||||
|
user.setPassword(SecureUtil.md5(defaultPassword).toUpperCase());
|
||||||
|
}else{
|
||||||
|
user.setPassword(SecureUtil.md5(user.getPassword()).toUpperCase());
|
||||||
|
}
|
||||||
|
// 创建时间赋值
|
||||||
|
user.setCreateTime(new Date());
|
||||||
|
return userMapper.addUser(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过OPenId获取用户信息
|
||||||
|
@Override
|
||||||
|
public User getUserByOpenId(User user) {
|
||||||
|
return userMapper.getUserByOpenId(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断用户是否存在
|
||||||
|
@Override
|
||||||
|
public int userExist(User user) {
|
||||||
|
return userMapper.userExist(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用户登录
|
||||||
|
@Override
|
||||||
|
public User login(User user) {
|
||||||
|
return userMapper.login(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过OpenId登录
|
||||||
|
@Override
|
||||||
|
public User loginByOpenId(User user) {
|
||||||
|
return userMapper.loginByOpenId(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新用户信息
|
||||||
|
@Override
|
||||||
|
public int updateUser(User user) {
|
||||||
|
// 对用户输入的密码进行MD5加密
|
||||||
|
if(user.getPassword().isEmpty()) {
|
||||||
|
user.setPassword(SecureUtil.md5(defaultPassword).toUpperCase());
|
||||||
|
}else{
|
||||||
|
user.setPassword(SecureUtil.md5(user.getPassword()).toUpperCase());
|
||||||
|
}
|
||||||
|
return userMapper.updateUser(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除用户信息
|
||||||
|
@Override
|
||||||
|
public int deleteUser(User user) {
|
||||||
|
return userMapper.deleteUser(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通过OpenId删除用户
|
||||||
|
@Override
|
||||||
|
public int deleteUserByOpenId(User user) {
|
||||||
|
return userMapper.deleteUserByOpenId(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所有用户
|
||||||
|
@Override
|
||||||
|
public List<User> getAllUser(User user) {
|
||||||
|
return userMapper.getAllUser(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取最大ID号
|
||||||
|
@Override
|
||||||
|
public int getMaxId() {
|
||||||
|
return userMapper.getMaxId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package cn.lailab.toolbox.tasks;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.lailab.toolbox.beans.domain.Auth;
|
||||||
|
import cn.lailab.toolbox.service.impl.AuthServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class AuthTask {
|
||||||
|
private final Logger logger = LoggerFactory.getLogger(AuthTask.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AuthServiceImpl authService;
|
||||||
|
|
||||||
|
@Value("${lailab.auth-task.random-length}")
|
||||||
|
private int randomLength;
|
||||||
|
|
||||||
|
@Scheduled(cron = "${lailab.auth-task.cron}")
|
||||||
|
public void authTask() {
|
||||||
|
Logger logger = LoggerFactory.getLogger(AuthTask.class);
|
||||||
|
logger.info("调用方法authTask()开始");
|
||||||
|
String str_random = RandomUtil.randomString(randomLength);
|
||||||
|
logger.info("1.获取随机数 内容:{}", str_random);
|
||||||
|
String str_md5 = SecureUtil.md5(str_random).toUpperCase();
|
||||||
|
logger.info("2.产生Md5数据 内容:{}", str_md5);
|
||||||
|
Auth auth = new Auth();
|
||||||
|
auth.setCode(str_random);
|
||||||
|
auth.setMd5code(str_md5);
|
||||||
|
auth.setType("api");
|
||||||
|
auth.setCreateTime(new Date());
|
||||||
|
logger.info("3.封装Auth对象 内容:{}", auth);
|
||||||
|
int code = authService.addAuth(auth);
|
||||||
|
|
||||||
|
if (code > 0) {
|
||||||
|
logger.info("调用方法authTask()结束 添加成功!");
|
||||||
|
}else{
|
||||||
|
logger.info("调用方法authTask()结束 添加失败!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: lailab-toolbox
|
||||||
|
datasource:
|
||||||
|
url: "jdbc:mysql://localhost/db_lailab"
|
||||||
|
username: "root"
|
||||||
|
password: "Qian20001028"
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
mini-program:
|
||||||
|
appid: "wx09ed3facc95abf94"
|
||||||
|
secret: "3d20927085d4eabc7e600201fe97642c"
|
||||||
|
|
||||||
|
lailab:
|
||||||
|
default-password: "123456" #新建用户默认密码
|
||||||
|
auth-task:
|
||||||
|
cron: "0 0/10 * * * ?"
|
||||||
|
random-length: 6
|
||||||
|
default-authCode: "D768ECAAB35C55ABBA071C5415D6520E"
|
||||||
|
|
||||||
|
mybatis:
|
||||||
|
mapper-locations: classpath:mapper/*Mapper.xml #mapper的映射文件
|
||||||
|
type-aliases-package: cn.lailab.toolbox.beans.domain
|
||||||
|
# anto-commit: true
|
||||||
|
# config-location: #置顶核心配置文件
|
||||||
|
|
||||||
|
logging:
|
||||||
|
file:
|
||||||
|
name: "./log/lailab-toolbox.log"
|
||||||
|
level:
|
||||||
|
org.springframework.web: info
|
||||||
|
org.hibernate.SQL: debug
|
||||||
|
cn.lailab: info
|
||||||
|
logback:
|
||||||
|
rollingpolicy:
|
||||||
|
max-file-size: 10MB
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: lailab-toolbox
|
||||||
|
datasource:
|
||||||
|
url: "jdbc:mysql://www.lailab.cc/db_lailab"
|
||||||
|
username: "root"
|
||||||
|
password: "lailab19980730mysql"
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 8080
|
||||||
|
# ssl:
|
||||||
|
# key-store: classpath:server.pkcs12
|
||||||
|
# key-store-password: lailab19980730key
|
||||||
|
# key-store-type: PKCS12
|
||||||
|
# # key-alias: myapp
|
||||||
|
# enabled: true
|
||||||
|
|
||||||
|
mini-program:
|
||||||
|
appid: "wx09ed3facc95abf94"
|
||||||
|
secret: "3d20927085d4eabc7e600201fe97642c"
|
||||||
|
|
||||||
|
lailab:
|
||||||
|
default-password: "123456" #新建用户默认密码
|
||||||
|
auth-task:
|
||||||
|
cron: "0 0/30 * * * ?"
|
||||||
|
random-length: 6
|
||||||
|
default-authCode: "D768ECAAB35C55ABBA071C5415D6520E"
|
||||||
|
|
||||||
|
# MyBatis 核心配置
|
||||||
|
mybatis:
|
||||||
|
# 1. 指定 Mapper XML 文件的位置(如果你的 Mapper 有 XML 映射文件,必须配置)
|
||||||
|
# mapper-locations: classpath:mapper/*Mapper.xml #mapper的映射文件
|
||||||
|
mapper-locations: classpath:mapper/**/*.xml
|
||||||
|
# 2. 配置实体类的别名包(这样在 XML 中可以直接用类名,不用写全限定名)
|
||||||
|
type-aliases-package: cn.lailab.toolbox.beans.domain
|
||||||
|
# 3. 开启驼峰命名自动转换(比如数据库字段 user_name 自动映射到实体类属性 userName)
|
||||||
|
# configuration:
|
||||||
|
# map-underscore-to-camel-case: true
|
||||||
|
# 可选:开启日志打印,方便调试 SQL
|
||||||
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
|
||||||
|
logging:
|
||||||
|
file:
|
||||||
|
name: "./log/lailab-toolbox.log"
|
||||||
|
level:
|
||||||
|
org.springframework.web: info
|
||||||
|
org.hibernate.SQL: debug
|
||||||
|
cn.lailab: info
|
||||||
|
logback:
|
||||||
|
rollingpolicy:
|
||||||
|
max-file-size: 10MB
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: pro
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.lailab.toolbox.mapper.AuthMapper">
|
||||||
|
<select id="getAuthCode" resultType="String">
|
||||||
|
select code from auth_codes where exists(
|
||||||
|
select *
|
||||||
|
from users
|
||||||
|
where ((username = #{username} AND password = #{password})
|
||||||
|
or (openId != '' AND openId = #{openId})))
|
||||||
|
order by createTime desc
|
||||||
|
limit 1;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAuthMd5Code" resultType="String">
|
||||||
|
select md5code from auth_codes where exists(
|
||||||
|
select *
|
||||||
|
from users
|
||||||
|
where ((username = #{username} AND password = #{password})
|
||||||
|
or (openid != '' AND openId = #{openId})))
|
||||||
|
order by createTime desc
|
||||||
|
limit 1;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getAuthMd5CodeInside" resultType="String">
|
||||||
|
select md5code from auth_codes
|
||||||
|
order by createTime desc
|
||||||
|
limit 1;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="addAuth" parameterType="auth">
|
||||||
|
insert into auth_codes(code, md5code, type, useCount, createTime)
|
||||||
|
values(#{code}, #{md5code}, #{type}, #{useCount}, #{createTime});
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="addUseCount" parameterType="string">
|
||||||
|
update auth_codes set useCount = useCount + 1 where md5code = #{md5code};
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.lailab.toolbox.mapper.ParameterMapper">
|
||||||
|
<resultMap id="base_result_map" type="cn.lailab.toolbox.beans.domain.Parameter">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="sort_id" property="sortId"/>
|
||||||
|
<result column="is_system" property="isSystem"/>
|
||||||
|
<result column="category" property="category"/>
|
||||||
|
<result column="type" property="type"/>
|
||||||
|
<result column="parameter_name" property="parameterName"/>
|
||||||
|
<result column="parameter_value" property="parameterValue"/>
|
||||||
|
<result column="description" property="description"/>
|
||||||
|
<result column="status" property="status"/>
|
||||||
|
<result column="create_user" property="createUser"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_user" property="updateUser"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
<sql id="base_column_list">
|
||||||
|
id,
|
||||||
|
sort_id,
|
||||||
|
is_system,
|
||||||
|
category,
|
||||||
|
type,
|
||||||
|
parameter_name,
|
||||||
|
parameter_value,
|
||||||
|
description,
|
||||||
|
status,
|
||||||
|
create_user,
|
||||||
|
create_time,
|
||||||
|
update_user,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
<select id="getAllParameter" resultMap="base_result_map">
|
||||||
|
select
|
||||||
|
<include refid="base_column_list"/>
|
||||||
|
from sys_parameter;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getParameterByName" resultMap="base_result_map">
|
||||||
|
select
|
||||||
|
<include refid="base_column_list"/>
|
||||||
|
from sys_parameter
|
||||||
|
where parameter_name = #{parameterName};
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.lailab.toolbox.mapper.UserMapper">
|
||||||
|
|
||||||
|
<sql id="base_column_list">
|
||||||
|
id, username, password, nickName, gender,
|
||||||
|
country,province, city, avatarUrl, openId,
|
||||||
|
phone, email, createTime, creator, source,
|
||||||
|
status
|
||||||
|
</sql>
|
||||||
|
<sql id="backup_sql">
|
||||||
|
and #{authCode} = (select md5code from auth_codes order by createTime desc limit 1);
|
||||||
|
</sql>
|
||||||
|
<select id="getAllUser" resultType="user">
|
||||||
|
select
|
||||||
|
<include refid="base_column_list"/>
|
||||||
|
from users
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserByOpenId" resultType="user">
|
||||||
|
select
|
||||||
|
<include refid="base_column_list"/>
|
||||||
|
from users
|
||||||
|
where openid = #{openId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="addUser" parameterType="user">
|
||||||
|
insert into users(username, password, nickName, gender, country,
|
||||||
|
province, city, avatarUrl, openId, phone,
|
||||||
|
email, creator, source, status)
|
||||||
|
values(#{username}, #{password}, #{nickName}, #{gender}, #{country},
|
||||||
|
#{province}, #{city}, #{avatarUrl}, #{openId}, #{phone},
|
||||||
|
#{email}, #{creator}, #{source}, #{status});
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="getMaxId" resultType="int">
|
||||||
|
select ifnull(max(id),0) from users;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="userExist" resultType="int">
|
||||||
|
select count(1)
|
||||||
|
from users
|
||||||
|
where username = #{username}
|
||||||
|
or (openId <![CDATA[<>]]> '' and openId = #{openId})
|
||||||
|
or (phone <![CDATA[<>]]> '' and phone = #{phone})
|
||||||
|
or (email <![CDATA[<>]]> '' and email = #{email});
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="login" resultType="user">
|
||||||
|
select id, username, password, nickName, gender,
|
||||||
|
country, province, city, avatarUrl, openId,
|
||||||
|
phone, email, createTime,creator, source,
|
||||||
|
status
|
||||||
|
from users
|
||||||
|
where (username = #{username} and password = #{password})
|
||||||
|
or (nickName = #{nickName} and password = #{password})
|
||||||
|
or (phone = #{phone} and password = #{password})
|
||||||
|
or (email = #{email}) and password = #{password}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="loginByOpenId" resultType="user">
|
||||||
|
select id, username, password, nickName, gender,
|
||||||
|
country, province, city, avatarUrl, openId,
|
||||||
|
phone, email, createTime, creator, source,
|
||||||
|
status
|
||||||
|
from users
|
||||||
|
where openId = #{openId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateUser" parameterType="user">
|
||||||
|
update users set password=#{password}, nickName=#{nickName}, gender=#{gender},
|
||||||
|
country=#{country}, province=#{province}, city=#{city},
|
||||||
|
avatarUrl=#{avatarUrl}, phone=#{phone}, email=#{email},
|
||||||
|
status=#{status}, openId=#{openId}
|
||||||
|
where username=#{username}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteUser" parameterType="user">
|
||||||
|
update users set status=4
|
||||||
|
where username=#{username};
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="deleteUserByOpenId" parameterType="user">
|
||||||
|
update users set status=4
|
||||||
|
where openId=#{openId};
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h1>hello word!!!</h1>
|
||||||
|
<p>this is a html page</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,297 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>计算器</title>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-family: "Helvetica Neue", Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 计算器容器 */
|
||||||
|
.calculator-container {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 400px;
|
||||||
|
height: 90vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background-color: #000;
|
||||||
|
border-radius: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 显示区域 */
|
||||||
|
.display {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: flex-end;
|
||||||
|
padding: 40px 30px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-text {
|
||||||
|
font-size: 24px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-text {
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮区域 */
|
||||||
|
.buttons {
|
||||||
|
flex: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-row {
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
flex: 1;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 20px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮样式 */
|
||||||
|
.btn-gray {
|
||||||
|
background-color: #a5a5a5;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-num {
|
||||||
|
background-color: #333333;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-orange {
|
||||||
|
background-color: #ff9f0a;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 0号按钮特殊样式 */
|
||||||
|
.zero {
|
||||||
|
border-radius: 50px;
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式适配 */
|
||||||
|
@media (max-width: 400px) {
|
||||||
|
.calculator-container {
|
||||||
|
height: 100vh;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display {
|
||||||
|
padding: 30px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-text {
|
||||||
|
font-size: 36px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="calculator-container">
|
||||||
|
<!-- 显示区域 -->
|
||||||
|
<div class="display">
|
||||||
|
<div class="input-text" id="inputValue"></div>
|
||||||
|
<div class="result-text" id="resultValue">0</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 按钮区域 -->
|
||||||
|
<div class="buttons">
|
||||||
|
<!-- 第一行 -->
|
||||||
|
<div class="btn-row">
|
||||||
|
<button class="btn btn-gray" onclick="clearAll()">AC</button>
|
||||||
|
<button class="btn btn-gray" onclick="deleteLast()">←</button>
|
||||||
|
<button class="btn btn-gray" onclick="handleOperator('%')">%</button>
|
||||||
|
<button class="btn btn-orange" onclick="handleOperator('/')">÷</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 第二行 -->
|
||||||
|
<div class="btn-row">
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('7')">7</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('8')">8</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('9')">9</button>
|
||||||
|
<button class="btn btn-orange" onclick="handleOperator('*')">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 第三行 -->
|
||||||
|
<div class="btn-row">
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('4')">4</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('5')">5</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('6')">6</button>
|
||||||
|
<button class="btn btn-orange" onclick="handleOperator('-')">-</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 第四行 -->
|
||||||
|
<div class="btn-row">
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('1')">1</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('2')">2</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('3')">3</button>
|
||||||
|
<button class="btn btn-orange" onclick="handleOperator('+')">+</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 第五行 -->
|
||||||
|
<div class="btn-row">
|
||||||
|
<button class="btn btn-num zero" onclick="handleNumber('0')">0</button>
|
||||||
|
<button class="btn btn-num" onclick="handleNumber('.')">.</button>
|
||||||
|
<button class="btn btn-orange" onclick="calculate()">=</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let inputValue = ''; // 输入的表达式
|
||||||
|
let resultValue = '0'; // 计算结果
|
||||||
|
|
||||||
|
// 获取DOM元素
|
||||||
|
const inputEl = document.getElementById('inputValue');
|
||||||
|
const resultEl = document.getElementById('resultValue');
|
||||||
|
|
||||||
|
// 更新显示
|
||||||
|
function updateDisplay() {
|
||||||
|
inputEl.textContent = inputValue;
|
||||||
|
resultEl.textContent = resultValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空
|
||||||
|
function clearAll() {
|
||||||
|
inputValue = '';
|
||||||
|
resultValue = '0';
|
||||||
|
updateDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退格
|
||||||
|
function deleteLast() {
|
||||||
|
if (inputValue.length > 0) {
|
||||||
|
inputValue = inputValue.substring(0, inputValue.length - 1);
|
||||||
|
// 如果还有输入内容,重新计算
|
||||||
|
if (inputValue) {
|
||||||
|
calculateResult(inputValue);
|
||||||
|
} else {
|
||||||
|
resultValue = '0';
|
||||||
|
}
|
||||||
|
updateDisplay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理数字输入
|
||||||
|
function handleNumber(value) {
|
||||||
|
// 处理小数点(只能有一个)
|
||||||
|
if (value === '.' && inputValue.includes('.')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理开头的0
|
||||||
|
if (inputValue === '0' && value !== '.') {
|
||||||
|
inputValue = value;
|
||||||
|
} else {
|
||||||
|
inputValue += value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 实时计算
|
||||||
|
calculateResult(inputValue);
|
||||||
|
updateDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理运算符
|
||||||
|
function handleOperator(value) {
|
||||||
|
const lastChar = inputValue.slice(-1);
|
||||||
|
|
||||||
|
// 替换运算符(如果最后一个字符是运算符)
|
||||||
|
const operators = ['+', '-', '*', '/', '%'];
|
||||||
|
if (operators.includes(lastChar)) {
|
||||||
|
inputValue = inputValue.substring(0, inputValue.length - 1) + value;
|
||||||
|
} else {
|
||||||
|
inputValue += value;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算结果
|
||||||
|
function calculate() {
|
||||||
|
calculateResult(inputValue);
|
||||||
|
updateDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 核心计算方法
|
||||||
|
function calculateResult(expression) {
|
||||||
|
if (!expression) return;
|
||||||
|
|
||||||
|
// 替换乘号为js识别的*
|
||||||
|
let exp = expression.replace(/×/g, '*');
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 使用eval计算(实际项目中可替换为更安全的表达式解析库)
|
||||||
|
let result = eval(exp);
|
||||||
|
|
||||||
|
// 处理大数和小数
|
||||||
|
if (result.toString().length > 10) {
|
||||||
|
result = result.toPrecision(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
resultValue = result.toString();
|
||||||
|
} catch (error) {
|
||||||
|
resultValue = 'Error';
|
||||||
|
console.error('计算错误:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化显示
|
||||||
|
updateDisplay();
|
||||||
|
|
||||||
|
// 键盘支持(可选)
|
||||||
|
document.addEventListener('keydown', (e) => {
|
||||||
|
const key = e.key;
|
||||||
|
if (/[0-9.]/.test(key)) {
|
||||||
|
handleNumber(key);
|
||||||
|
} else if (['+', '-', '*', '/', '%'].includes(key)) {
|
||||||
|
handleOperator(key === '*' ? '×' : key);
|
||||||
|
} else if (key === 'Enter' || key === '=') {
|
||||||
|
calculate();
|
||||||
|
} else if (key === 'Backspace') {
|
||||||
|
deleteLast();
|
||||||
|
} else if (key === 'Escape') {
|
||||||
|
clearAll();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package cn.lailab.toolbox;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
class LailabToolboxApplicationTests {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void contextLoads() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user