Merge pull request #108 from rymcu/format

🎨 add Dockerfile
This commit is contained in:
ronger 2022-10-12 13:59:37 +08:00 committed by GitHub
commit 9d1da21bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 848 additions and 15 deletions

156
.onedev-buildspec.yml Normal file
View File

@ -0,0 +1,156 @@
version: 18
jobs:
- name: maven ci
steps:
- !CheckoutStep
name: checkout
cloneCredential: !DefaultCredential {}
withLfs: false
withSubmodules: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: detect build version
runInContainer: true
image: '@script:builtin:maven:determine-docker-image@'
interpreter: !DefaultInterpreter
commands:
- echo "Detecting project version (may require some time while downloading maven
dependencies)..."
- echo $(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version
-q -DforceStdout) > buildVersion
useTTY: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !SetBuildVersionStep
name: set build version
buildVersion: '@file:buildVersion@'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: run unit tests
runInContainer: true
image: '@script:builtin:maven:determine-docker-image@'
interpreter: !DefaultInterpreter
commands:
- mvn clean test -P dev
useTTY: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
triggers:
- !BranchUpdateTrigger {}
retryCondition: never
maxRetries: 3
retryDelay: 30
cpuRequirement: 250
memoryRequirement: 256
caches:
- key: maven-cache
path: /root/.m2/repository
timeout: 3600
- name: package
steps:
- !CheckoutStep
name: Checkout Code
cloneCredential: !DefaultCredential {}
withLfs: false
withSubmodules: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: delete build version
runInContainer: true
image: '@script:builtin:maven:determine-docker-image@'
interpreter: !DefaultInterpreter
commands:
- echo "Detecting project version (may require some time while downloading maven
dependencies)..."
- echo $(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version
-q -DforceStdout) > buildVersion
useTTY: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !SetBuildVersionStep
name: Set Build Version
buildVersion: '@file:buildVersion@'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !CommandStep
name: run maven package
runInContainer: true
image: '@script:builtin:maven:determine-docker-image@'
interpreter: !DefaultInterpreter
commands:
- mvn package
useTTY: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !PublishArtifactStep
name: Publish Artifacts
artifacts: '**'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
jobExecutor: internal
retryCondition: never
maxRetries: 3
retryDelay: 30
cpuRequirement: 250
memoryRequirement: 256
caches:
- key: maven-cache
path: /root/.m2/repository
timeout: 3600
- name: Build Docker Image
steps:
- !SetBuildVersionStep
name: Set Build Version
buildVersion: '@file:buildVersion@'
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
- !BuildImageStep
name: Build Docker Image
tags: rymcu/forest:@build_version@
publish: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
jobDependencies:
- jobName: package
requireSuccessful: true
artifacts: '**'
retryCondition: never
maxRetries: 3
retryDelay: 30
cpuRequirement: 250
memoryRequirement: 256
timeout: 3600
- name: Pull from Github
steps:
- !PullRepository
name: Pull from GitHub
remoteUrl: https://github.com/ronger-x/forest
syncToChildProject: false
passwordSecret: access_token
refs: refs/heads/* refs/tags/*
withLfs: false
force: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
triggers:
- !ScheduleTrigger
cronExpression: 0 0 1 * * ?
retryCondition: never
maxRetries: 3
retryDelay: 30
cpuRequirement: 250
memoryRequirement: 256
timeout: 3600
- name: Push to GitHub
steps:
- !PushRepository
name: Push to GitHub
remoteUrl: https://github.com/ronger-x/forest
passwordSecret: access_token
withLfs: false
force: false
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
triggers:
- !BranchUpdateTrigger
branches: master
projects: forest
- !TagCreateTrigger
branches: master
projects: forest
retryCondition: never
maxRetries: 3
retryDelay: 30
cpuRequirement: 250
memoryRequirement: 256
timeout: 3600

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM rymcu/java-container:1.0.0
MAINTAINER rymcu.com
COPY target/forest.war /usr/local/tomcat/webapps/
ENV JAVA_HOME=/usr/lib/jvm/jdk1.8.0_202
ENV PATH=$JAVA_HOME/bin:$PATH
CMD ["/usr/local/tomcat/bin/catalina.sh", "run"]
EXPOSE 8080

179
forest.iml Normal file
View File

@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
<facet type="web" name="Web">
<configuration>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.2" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.3.22" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:6.1.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.79.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.21" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.32" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-mail:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.22" level="project" />
<orderEntry type="library" name="Maven: com.sun.mail:jakarta.mail:1.6.7" level="project" />
<orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.7.2" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.7.2" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.2" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.9" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.30" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.7.2" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.65" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.65" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.65" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.7.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.22.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.8.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:4.5.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.12.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.12.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:4.5.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.22" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.3.22" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.9.0" level="project" />
<orderEntry type="library" name="Maven: net.minidev:json-smart:2.4.8" level="project" />
<orderEntry type="library" name="Maven: net.minidev:accessors-smart:2.4.8" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:9.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper:4.2.1" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.5" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.14" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.14" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.14" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.9.1" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.9.1" level="project" />
<orderEntry type="library" name="Maven: org.owasp.encoder:encoder:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.2.13-SNSAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.13-SNSAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.19.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.19.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.7.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.3.22" level="project" />
<orderEntry type="library" name="Maven: org.jodd:jodd-http:6.3.0" level="project" />
<orderEntry type="library" name="Maven: org.jodd:jodd-util:6.1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jedis-lock:jedis-lock:1.0.0" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.8.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.11.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-queryparser:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-core:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-queries:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-sandbox:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-analyzers-common:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-highlighter:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-memory:8.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-suggest:8.11.2" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.8.7" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-http:5.8.7" level="project" />
<orderEntry type="library" name="Maven: com.warrenstrange:googleauth:1.5.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.15" level="project" />
</component>
</module>

109
pom.xml
View File

@ -31,6 +31,11 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
@ -103,13 +108,13 @@
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId> <artifactId>pagehelper</artifactId>
<version>5.3.1</version> <version>5.3.2</version>
</dependency> </dependency>
<!-- fastjson --> <!-- fastjson -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>2.0.12</version> <version>2.0.14</version>
</dependency> </dependency>
<!-- shiro权限控制框架 --> <!-- shiro权限控制框架 -->
<dependency> <dependency>
@ -158,7 +163,7 @@
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId> <artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.11</version> <version>1.2.13-SNSAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
@ -170,7 +175,7 @@
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId> <artifactId>log4j-to-slf4j</artifactId>
<version>2.18.0</version> <version>2.19.0</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
@ -181,7 +186,7 @@
<dependency> <dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId> <artifactId>log4j-api</artifactId>
<version>2.18.0</version> <version>2.19.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@ -201,11 +206,6 @@
<artifactId>jodd-http</artifactId> <artifactId>jodd-http</artifactId>
<version>6.3.0</version> <version>6.3.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.19</version>
</dependency>
<dependency> <dependency>
<groupId>com.github.jedis-lock</groupId> <groupId>com.github.jedis-lock</groupId>
<artifactId>jedis-lock</artifactId> <artifactId>jedis-lock</artifactId>
@ -241,12 +241,12 @@
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId> <artifactId>hutool-core</artifactId>
<version>5.8.5</version> <version>5.8.8</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId> <artifactId>hutool-http</artifactId>
<version>5.8.5</version> <version>5.8.8</version>
</dependency> </dependency>
<dependency> <dependency>
@ -272,15 +272,98 @@
<include>**/**/*.xml</include> <include>**/**/*.xml</include>
</includes> </includes>
</resource> </resource>
<!-- 资源文件配置 -->
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/**</include>
</includes>
</resource>
<!-- 过滤配置文件到config目录 -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<targetPath>config</targetPath>
<includes>
<include>application.yml</include>
<include>application-${profileActive}.yml</include>
<include>banner.txt</include>
<include>logback.xml</include>
<include>*.properties</include>
</includes>
</resource>
</resources> </resources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.5.RELEASE</version> <version>2.3.5.RELEASE</version>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
<finalName>forest</finalName> <finalName>forest</finalName>
</build> </build><!--MAVEN打包选择运行环境-->
<!-- 1:dev:开发环境 2:prod:生产环境 -->
<profiles>
<profile>
<id>dev</id>
<properties>
<profileActive>dev</profileActive>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
<profile>
<id>prod</id>
<properties>
<profileActive>prod</profileActive>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project> </project>

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
src/main/java/com/rymcu/forest/lucene/core/Lexeme.java Executable file → Normal file
View File

View File

View File

View File

View File

0
src/main/java/com/rymcu/forest/lucene/dic/Hit.java Executable file → Normal file
View File

View File

View File

View File

View File

View File

@ -122,7 +122,7 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
userMapper.updateLastOnlineTimeByEmail(user.getEmail()); userMapper.updateLastOnlineTimeByEmail(user.getEmail());
TokenUser tokenUser = new TokenUser(); TokenUser tokenUser = new TokenUser();
BeanCopierUtil.copy(user, tokenUser); BeanCopierUtil.copy(user, tokenUser);
tokenUser.setToken(tokenManager.createToken(account)); tokenUser.setToken(tokenManager.createToken(user.getEmail()));
tokenUser.setWeights(userMapper.selectRoleWeightsByUser(user.getIdUser())); tokenUser.setWeights(userMapper.selectRoleWeightsByUser(user.getIdUser()));
// 保存登录日志 // 保存登录日志
loginRecordService.saveLoginRecord(tokenUser.getIdUser()); loginRecordService.saveLoginRecord(tokenUser.getIdUser());

0
src/main/java/mapper/lucene/ArticleLuceneMapper.xml Executable file → Normal file
View File

0
src/main/java/mapper/lucene/UserDicMapper.xml Executable file → Normal file
View File

View File

@ -0,0 +1,100 @@
publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANbY1W9TXU+OdseRBVw5/eq1rs5UVQZie5ydEPYIurRzF4oBORu/+Sjqt+c5mHulleuiD4Yov+0e/CXODg4FYu8CAwEAAQ==
spring:
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML
encoding: UTF-8
servlet:
content-type: text/html
cache: false
redis:
host: 192.168.31.200
port: 6379
password: d9d2j9w2
database: 1
timeout: 3000
jedis:
pool:
max-active: 8
max-wait: 1
max-idle: 500
min-idle: 0
datasource:
druid:
url: jdbc:mysql://192.168.31.200:3306/forest?characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: root
password: Ldh1NrsXJntz5nTXeO0nPh+8s1FMe+JHCfXy2Zj3egqqjegN+mNe+53ZmduUlVdE4ZqKuUho7T9yftc6AYYKog==
driver-class-name: com.mysql.cj.jdbc.Driver
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
time-between-eviction-runs-millis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
min-evictable-idle-time-millis: 30000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
connection-properties: config.decrypt=true;config.decrypt.key=${publickey}
filters: config,stat
max-pool-prepared-statement-per-connection-size: 100
stat-view-servlet:
enabled: true
allow:
login-username: admin
login-password: rymcu.Test1
filter:
stat:
log-slow-sql: true
resources:
add-mappings: true
mail:
host: smtp.ym.163.com
port: 465
username: service@rymcu.com
password: 4W3tCXdyk0Gm
wx:
open:
componentAppId: wx9c4a7dfb3238d5f6
componentSecret: e32a6f75ab6b746ec3ae38a39a79ba22
componentToken: rymcu
componentAesKey: NWIwMDQyZjU0YWI2NGFlZThkOWZhZTg3NTg4NzQwN2E
mp:
configs:
- appId: wxf085386aa07c0857
secret: aabd075d2851764714fd14a0d0b1b8b4
token: rymcu
aesKey: lvn3mMSnFOvbnIJVNhHQqjWb9swe66L1xIcerJSs0fm
- appId: wxa49093339a5a822b
secret: 29e9390e6d58d57a2b2a2350dbee8754
token: qwert
aesKey:
miniapp:
configs:
- appid: wxb4fff78a6b878cf7
secret: c8735d0ccc8497b8509dc2762246cb37
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
env: dev
logging:
file:
path: /logs/vertical
level: debug
server:
port: 8099
servlet:
context-path: /forest
max-http-header-size: 1048576
version: 1.0
resource:
domain: http://test.rymcu.com
file-path: http://test.rymcu.com
pic-path: /opt/nebula/static
baidu:
data:
site: https://rymcu.com
token: 9cdKR6bVCJzxDEJS
ai:
appId: 22891829
appKey: HKxdO8ioaUmltZh0eaOVMsmW
secretKey: GXOtl3XtiIkVA3CPsc3c29Pqa4V290Yr

View File

@ -0,0 +1,109 @@
publicKey: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMJp8DiJzkOxlpcx0RdLcXRV0gMnKVZfERC/t0JD324baxCW8MYpTQBvcJS3foW4w5IQlnjRdJwg2VF3gvqkPpECAwEAAQ==
spring:
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: HTML
encoding: UTF-8
servlet:
content-type: text/html
cache: false
redis:
host: 127.0.0.1
port: 6379
password: d9d2j9w2
database: 1
timeout: 3000
jedis:
pool:
max-active: 8
max-wait: 1
max-idle: 500
min-idle: 0
datasource:
druid:
url: jdbc:mysql://101.132.182.12:3306/forest?characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: root
password: SFCUIZVG/y3IZ+dPcx1Jk2WnAaqU5zkV4iqqOtRKFLOpA5FHiNXW+cXuvKGEJeL6sC9uPo+qR7ljB2R4xG0DGQ==
driver-class-name: com.mysql.cj.jdbc.Driver
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 30000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
connection-properties: config.decrypt=true;config.decrypt.key=${publickey}
filters: config,stat
max-pool-prepared-statement-per-connection-size: 100
stat-view-servlet:
enabled: true
allow:
login-username: admin
login-password: rymcu.Test1
filter:
stat:
log-slow-sql: true
resources:
add-mappings: true
mail:
host: smtp.ym.163.com
port: 465
username: service@rymcu.com
password: Aa12345678
servlet:
multipart:
max-file-size: 10MB
max-request-size: 20MB
wx:
open:
componentAppId: wx9c4a7dfb3238d5f6
componentSecret: e32a6f75ab6b746ec3ae38a39a79ba22
componentToken: rymcu
componentAesKey: NWIwMDQyZjU0YWI2NGFlZThkOWZhZTg3NTg4NzQwN2E
mp:
configs:
- appId: wx1082362f11561645
secret: f15ffc794c0b3fb6c2bc1207bd553365
token: rymcu
aesKey: lvn3mMSnFOvbnIJVNhHQqjWb9swe66L1xIcerJSs0fm
- appId: wxa49093339a5a822b
secret: 29e9390e6d58d57a2b2a2350dbee8754
token: qwert
aesKey:
miniapp:
configs:
- appid: wxb4fff78a6b878cf7
secret: c8735d0ccc8497b8509dc2762246cb37
token: #微信小程序消息服务器配置的token
aesKey: #微信小程序消息服务器配置的EncodingAESKey
msgDataFormat: JSON
env: prod
logging:
file:
path: /logs/forest
level:
com:
rymcu: info
server:
port: 8099
servlet:
context-path: /forest
compression:
enabled: true
mime-types: application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 1024
max-http-header-size: 1048576
version: 1.0
resource:
domain: https://rymcu.com
file-path: https://static.rymcu.com
pic-path: /usr/local/src/nebula/static
baidu:
data:
site: https://rymcu.com
token: 9cdKR6bVCJzxDEJS
ai:
appId: 22891829
appKey: HKxdO8ioaUmltZh0eaOVMsmW
secretKey: GXOtl3XtiIkVA3CPsc3c29Pqa4V290Yr
reserved-words: \u7cfb\u7edf\u516c\u544a\u002c\u516c\u544a

View File

@ -1,6 +1,9 @@
---
spring: spring:
profiles: profiles:
active: dev active: '@profileActive@'
---
spring:
thymeleaf: thymeleaf:
prefix: classpath:/templates/ prefix: classpath:/templates/
suffix: .html suffix: .html

0
src/main/resources/lucene/ext.dic Executable file → Normal file
View File

0
src/main/resources/lucene/main2012.dic Executable file → Normal file
View File

0
src/main/resources/lucene/quantifier.dic Executable file → Normal file
View File

0
src/main/resources/lucene/sensitive.dic Executable file → Normal file
View File

0
src/main/resources/lucene/stopword.dic Executable file → Normal file
View File

0
src/main/resources/lucene/web.dic Executable file → Normal file
View File

View File

@ -388,3 +388,193 @@ create table forest_login_record
constraint forest_login_record_id_uindex constraint forest_login_record_id_uindex
unique (id) unique (id)
) comment '登录记录表' collate = utf8mb4_unicode_ci; ) comment '登录记录表' collate = utf8mb4_unicode_ci;
create table forest_product
(
id int auto_increment comment '主键'
primary key,
product_title varchar(100) null comment '产品名',
product_price int default 0 null comment '单价(单位:分)',
product_img_url varchar(100) null comment '产品主图',
product_description varchar(200) null comment '产品描述',
weights tinyint default 50 null comment '权重,数值越小权限越大;0:无权限',
created_time datetime null comment '创建时间',
updated_time datetime null comment '更新时间',
constraint forest_product_id_uindex
unique (id)
)
comment '产品表';
create table forest_product_content
(
id_product int null comment '产品表主键',
product_content text null comment '产品详情原文',
product_content_html text null comment '产品详情 Html',
created_time datetime null comment '创建时间',
updated_time datetime null comment '更新时间'
)
comment '产品详情表';
INSERT INTO forest.forest_product (id, product_title, product_price, product_img_url, product_description, weights, created_time, updated_time) VALUES (1, 'Nebula Pi', 2000000, 'https://static.rymcu.com/article/1648960741563.jpg', '产品描述', 20, '2022-06-13 22:35:33', '2022-06-13 22:35:33');
INSERT INTO forest.forest_product_content (id_product, product_content, product_content_html, created_time,
updated_time)
VALUES (1, '![nebula pi](https://static.rymcu.com/article/1640531590770)
Nebula-Pi
## 1.1主板结构及布局
![](https://static.rymcu.com/article/1640531590844)
1.1 Nebula-Pi
## 1.2主板元件说明
1.1 Nebula-Pi 51 ********
| | | |
| --- | --- | --- |
| 1 | USB | |
| 2 | 线 | 51 线使 |
| 3 | | |
| 4 | 51 STC89C52RC | 51 STC STC89C52RC |
| 5 | 线 | 线 OLED LCD |
| 6 | | |
| 7 | | |
| 8 | | |
| 9 | | 1602/12864 |
| 10 | | 4 4 |
| 11 | | "滴滴" |
| 12 | & | |
| 13 | | |
| 14 | 8 LED | 8 LED |
| 15 | 51 STC12 | 51 |
| 16 | 2.4G 线 | 2.4G 线线 1-2Km |
| 17 | 3 | 3 |
| 18 | | 线 220V |
| 19 | | 5V 3.3V |
| 20 | WiFi | WiFi WiFi |
1-1
', '<p><img src="https://static.rymcu.com/article/1640531590770" alt="nebula pi" /></p>
<p>Nebula-Pi </p>
<h2 id="1-1主板结构及布局">1.1 </h2>
<p><img src="https://static.rymcu.com/article/1640531590844" alt="" /></p>
<p> 1.1 Nebula-Pi </p>
<h2 id="1-2主板元件说明">1.2 </h2>
<p> 1.1 Nebula-Pi 51 <strong></strong> <strong></strong></p>
<table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td> USB </td>
<td></td>
</tr>
<tr>
<td>2</td>
<td>线</td>
<td> 51 线使</td>
</tr>
<tr>
<td>3</td>
<td></td>
<td></td>
</tr>
<tr>
<td>4</td>
<td>51 STC89C52RC</td>
<td> 51 STC STC89C52RC </td>
</tr>
<tr>
<td>5</td>
<td>线</td>
<td>线 OLED LCD</td>
</tr>
<tr>
<td>6</td>
<td></td>
<td></td>
</tr>
<tr>
<td>7</td>
<td></td>
<td></td>
</tr>
<tr>
<td>8</td>
<td></td>
<td></td>
</tr>
<tr>
<td>9</td>
<td></td>
<td> 1602/12864 </td>
</tr>
<tr>
<td>10</td>
<td></td>
<td>4 4 </td>
</tr>
<tr>
<td>11</td>
<td></td>
<td>&quot;&quot;</td>
</tr>
<tr>
<td>12</td>
<td>&amp;</td>
<td></td>
</tr>
<tr>
<td>13</td>
<td></td>
<td></td>
</tr>
<tr>
<td>14</td>
<td>8 LED </td>
<td>8 LED </td>
</tr>
<tr>
<td>15</td>
<td> 51 STC12</td>
<td> 51 </td>
</tr>
<tr>
<td>16</td>
<td>2.4G 线</td>
<td> 2.4G 线线 1-2Km</td>
</tr>
<tr>
<td>17</td>
<td>3 </td>
<td>3 </td>
</tr>
<tr>
<td>18</td>
<td></td>
<td>线 220V </td>
</tr>
<tr>
<td>19</td>
<td></td>
<td> 5V 3.3V </td>
</tr>
<tr>
<td>20</td>
<td>WiFi </td>
<td>WiFi WiFi </td>
</tr>
</tbody>
</table>
<p> 1-1 </p>
', '2022-06-13 22:35:34', '2022-06-13 22:35:34');