commit
5b367b4a78
156
.onedev-buildspec.yml
Normal file
156
.onedev-buildspec.yml
Normal 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
13
Dockerfile
Normal 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
179
forest.iml
Normal 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
109
pom.xml
@ -31,6 +31,11 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.33</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
@ -103,13 +108,13 @@
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<version>5.3.2</version>
|
||||
</dependency>
|
||||
<!-- fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>2.0.12</version>
|
||||
<version>2.0.14</version>
|
||||
</dependency>
|
||||
<!-- shiro权限控制框架 -->
|
||||
<dependency>
|
||||
@ -158,7 +163,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.2.11</version>
|
||||
<version>1.2.13-SNSAPSHOT</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
@ -170,7 +175,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-to-slf4j</artifactId>
|
||||
<version>2.18.0</version>
|
||||
<version>2.19.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
@ -181,7 +186,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.18.0</version>
|
||||
<version>2.19.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -201,11 +206,6 @@
|
||||
<artifactId>jodd-http</artifactId>
|
||||
<version>6.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
<version>1.4.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jedis-lock</groupId>
|
||||
<artifactId>jedis-lock</artifactId>
|
||||
@ -241,12 +241,12 @@
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-core</artifactId>
|
||||
<version>5.8.5</version>
|
||||
<version>5.8.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
<version>5.8.5</version>
|
||||
<version>5.8.8</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -272,15 +272,98 @@
|
||||
<include>**/**/*.xml</include>
|
||||
</includes>
|
||||
</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>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<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>
|
||||
</plugins>
|
||||
<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>
|
||||
|
0
src/main/java/com/rymcu/forest/lucene/api/LuceneSearchController.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/api/LuceneSearchController.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/api/UserDicController.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/api/UserDicController.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/cfg/Configuration.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/cfg/Configuration.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/cfg/DefaultConfig.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/cfg/DefaultConfig.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/AnalyzeContext.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/AnalyzeContext.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/CJKSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/CJKSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/CN_QuantifierSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/CN_QuantifierSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/CharacterUtil.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/CharacterUtil.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/IKArbitrator.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/IKArbitrator.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/IKSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/IKSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/ISegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/ISegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/LetterSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/LetterSegmenter.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/Lexeme.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/Lexeme.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/LexemePath.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/LexemePath.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/QuickSortSet.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/core/QuickSortSet.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/dic/DictSegment.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/dic/DictSegment.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/dic/Dictionary.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/dic/Hit.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/dic/Hit.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/lucene/IKAnalyzer.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/lucene/IKAnalyzer.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/lucene/IKTokenizer.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/lucene/IKTokenizer.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/mapper/ArticleLuceneMapper.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/mapper/ArticleLuceneMapper.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/mapper/UserDicMapper.java
Executable file → Normal file
0
src/main/java/com/rymcu/forest/lucene/mapper/UserDicMapper.java
Executable file → Normal file
@ -122,7 +122,7 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
|
||||
userMapper.updateLastOnlineTimeByEmail(user.getEmail());
|
||||
TokenUser tokenUser = new TokenUser();
|
||||
BeanCopierUtil.copy(user, tokenUser);
|
||||
tokenUser.setToken(tokenManager.createToken(account));
|
||||
tokenUser.setToken(tokenManager.createToken(user.getEmail()));
|
||||
tokenUser.setWeights(userMapper.selectRoleWeightsByUser(user.getIdUser()));
|
||||
// 保存登录日志
|
||||
loginRecordService.saveLoginRecord(tokenUser.getIdUser());
|
||||
|
0
src/main/java/mapper/lucene/ArticleLuceneMapper.xml
Executable file → Normal file
0
src/main/java/mapper/lucene/ArticleLuceneMapper.xml
Executable file → Normal file
0
src/main/java/mapper/lucene/UserDicMapper.xml
Executable file → Normal file
0
src/main/java/mapper/lucene/UserDicMapper.xml
Executable file → Normal file
100
src/main/resources/application-dev.yml
Normal file
100
src/main/resources/application-dev.yml
Normal 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
|
109
src/main/resources/application-prod.yml
Normal file
109
src/main/resources/application-prod.yml
Normal 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
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
active: '@profileActive@'
|
||||
---
|
||||
spring:
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
|
0
src/main/resources/lucene/ext.dic
Executable file → Normal file
0
src/main/resources/lucene/ext.dic
Executable file → Normal file
0
src/main/resources/lucene/main2012.dic
Executable file → Normal file
0
src/main/resources/lucene/main2012.dic
Executable file → Normal file
0
src/main/resources/lucene/quantifier.dic
Executable file → Normal file
0
src/main/resources/lucene/quantifier.dic
Executable file → Normal file
0
src/main/resources/lucene/sensitive.dic
Executable file → Normal file
0
src/main/resources/lucene/sensitive.dic
Executable file → Normal file
0
src/main/resources/lucene/stopword.dic
Executable file → Normal file
0
src/main/resources/lucene/stopword.dic
Executable file → Normal file
0
src/main/resources/lucene/web.dic
Executable file → Normal file
0
src/main/resources/lucene/web.dic
Executable file → Normal file
@ -388,3 +388,193 @@ create table forest_login_record
|
||||
constraint forest_login_record_id_uindex
|
||||
unique (id)
|
||||
) 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>相当于开发板的小喇叭,可以发出"滴滴"等声音</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>12</td>
|
||||
<td>光敏&热敏电阻</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');
|
Loading…
Reference in New Issue
Block a user