test
This commit is contained in:
parent
4a5dc4b414
commit
2bed114763
32
.gitignore
vendored
Normal file
32
.gitignore
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
target/
|
||||
logs/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
|
||||
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
|
||||
!/.mvn/wrapper/maven-wrapper.jar
|
||||
*.log.gz
|
||||
.settings/
|
||||
|
||||
*.class
|
||||
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
/target
|
||||
/logs
|
||||
/.settings
|
||||
.classpath
|
||||
/.project
|
||||
/.sts4-cache
|
||||
.sts4-cache
|
||||
.factorypath
|
||||
|
||||
rebel.xml
|
||||
log4j2-dev.yml
|
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
22
.idea/compiler.xml
generated
Normal file
22
.idea/compiler.xml
generated
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="cms" />
|
||||
<module name="dreamer_cms-lx" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="cms" options="-parameters" />
|
||||
<module name="dreamer_cms" options="-parameters" />
|
||||
<module name="dreamer_cms-lx" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
12
.idea/dataSources.xml
generated
Normal file
12
.idea/dataSources.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="dreamer-cms-lx@localhost" uuid="af21f08a-3fc7-41b2-ac20-44c61bfc4092">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://localhost:3306/dreamer-cms-lx</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
9
.idea/dreamer_cms.iml
generated
Normal file
9
.idea/dreamer_cms.iml
generated
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
.idea/encodings.xml
generated
Normal file
6
.idea/encodings.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
35
.idea/jarRepositories.xml
generated
Normal file
35
.idea/jarRepositories.xml
generated
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
16
.idea/jsLinters/jshint.xml
generated
Normal file
16
.idea/jsLinters/jshint.xml
generated
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JSHintConfiguration" version="2.13.6" use-config-file="true" use-custom-config-file="true" custom-config-file-path="$PROJECT_DIR$/src/main/resources/static/resource/js/editor.md-master/.jshintrc">
|
||||
<option bitwise="true" />
|
||||
<option browser="true" />
|
||||
<option curly="true" />
|
||||
<option eqeqeq="true" />
|
||||
<option forin="true" />
|
||||
<option maxerr="50" />
|
||||
<option noarg="true" />
|
||||
<option noempty="true" />
|
||||
<option nonew="true" />
|
||||
<option strict="true" />
|
||||
<option undef="true" />
|
||||
</component>
|
||||
</project>
|
12
.idea/misc.xml
generated
Normal file
12
.idea/misc.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
7
.idea/sqldialects.xml
generated
Normal file
7
.idea/sqldialects.xml
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SqlDialectMappings">
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources/mapping/FormMapper.xml" dialect="GenericSQL" />
|
||||
<file url="PROJECT" dialect="MySQL" />
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
1
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1 @@
|
||||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
|
34
Dockerfile
Normal file
34
Dockerfile
Normal file
@ -0,0 +1,34 @@
|
||||
FROM java:8
|
||||
|
||||
MAINTAINER www.iteachyou.cc<153095904@qq.com>
|
||||
|
||||
LABEL description="I Teach You, 我教你!- 专注于IT技术分享、免费教程、学习资源的博客。"
|
||||
|
||||
# 指定容器时区
|
||||
ENV TZ=Asia/Shanghai
|
||||
# 同步时间
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# 创建工作目录
|
||||
RUN mkdir -p /dreamer_cms
|
||||
# 创建资源目录
|
||||
RUN mkdir -p /dreamer_cms/resources
|
||||
# 创建日志目录
|
||||
RUN mkdir -p /dreamer_cms/logs
|
||||
|
||||
# 切换工作目录
|
||||
WORKDIR /dreamer_cms
|
||||
|
||||
# 设置环境变量
|
||||
ENV SERVER_PORT=8888
|
||||
ENV RESOURCE_DIR=/dreamer_cms/resources
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE ${SERVER_PORT}
|
||||
|
||||
# 将jar包复制到Dockerfile所在的相对目录下目录下,可以是URL,也可以是tar.gz(自动解压);(当使用本地目录为源目录时,推荐使用 COPY)
|
||||
# ADD是复制指定路径到容器路径,COPY是复制本地主机的路径到容器的路径。
|
||||
ADD ./target/dreamer-cms.jar ./
|
||||
|
||||
# 启动命令
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dserver.port=${SERVER_PORT}", "-Dweb.resource-path=${RESOURCE_DIR}", "-jar", "dreamer-cms.jar > /dreamer_cms/logs/dreamer-cms.log"]
|
201
LICENSE
Normal file
201
LICENSE
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2022 I Teach You,我教你
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
120
README.md
Normal file
120
README.md
Normal file
@ -0,0 +1,120 @@
|
||||
<p align="center">
|
||||
<a href="https://www.iteachyou.cc/" target="_blank"><img src="http://121.8.219.2:18887/logo.png" width="400" ></a>
|
||||
</p>
|
||||
|
||||
<div style="display: flex; justify-content: center;">
|
||||
|
||||
[](https://www.murphysec.com/dr/uURRBRDjHq7ttx9MvG)
|
||||
[](https://github.com/murphysecurity/murphysec/blob/master/LICENSE)
|
||||
[](https://gitee.com/isoftforce/dreamer_cms/stargazers)
|
||||
|
||||
</div>
|
||||
|
||||
# 梦想家内容管理系统(Dreamer CMS)
|
||||
> 自2025-03-15开始,本项目不再提供演示地址和在线文档,用户可在项目中docs文件夹中自行查看文档,同时www.iteachyou.cc也不在维护。
|
||||
|
||||
> 如未授权,根据软件使用协议,请务必保留官方版权。前后台页底必须保留 "Powered by I Teach You , 我教你!" 文字和链接!如未按要求保留官方版权且未授权用户,将依法追究法律责任。
|
||||
|
||||
> 鼓励大学毕业生在此开源项目基础上进行毕业设计项目开发,但请遵守开源协议并添加自己的开发和创新内容,且论文中应明确标注源码的来源;拿来就用主义者视为侵权。
|
||||
|
||||
当前版本:4.1.3
|
||||
|
||||
1. 梦想家CMS官网:http://121.8.219.2:18888/
|
||||
2. 梦想家CMS管理后台:http://121.8.219.2:18888/admin
|
||||
- 演示账号:demo1
|
||||
- 演示密码:123456
|
||||
- 管理员:wangjn
|
||||
- 管理员密码:123456
|
||||
3. I Teach You,我教你! 官网:https://www.iteachyou.cc
|
||||
4. 模版标签开发教程请参考:http://121.8.219.2:18889/
|
||||
|
||||
QQ交流群:
|
||||
- ①597652651(未满)
|
||||
- ②623605199(已满)
|
||||
- ③573574854(未满)
|
||||
|
||||
微信交流群:
|
||||
- 可添加群主微信好友,群主拉群;微信二维码见下方。
|
||||
|
||||
DreamerCMS(梦想家CMS内容管理系统)史上最精简的CMS系统,完全开源、完全免费。公开解决了快速搭建展示型网站(如:企业官网、技术博客、信息门户等)的框架体系,是电子政务、电信综合门户、企业信息门户、知识管理平台、电子商务平台的基础性软件系统。可以帮助政府、企业或组织灵活、准确、高效、智能地管理信息内容,实现信息的采集、加工、审核、发布、存储、检索、统计、分析、 反馈等整个信息生命周期的管理。采用时下最流行的Springboot+thymeleaf框架搭建,具有灵活小巧,配置简单,标签化模版,快速开发等特点。主要解决公司搭建网站成本高、投入大、周期长等问题,也可作为初创公司很好的基础技术框架。使用过程中不需要专业的后端技术开发技能,只要使用系统提供的模版标签,即可轻轻松松建设网站。
|
||||
|
||||
DreamerCMS从2.0.0版本开始采用了解析式引擎与编译式引擎并存的模式,由于在解析模版时,解析式引擎拥有巨大的优势,但对于动态浏览的互动性质的页面,编译式引擎更实用高效,DreamerCMS采用双引擎并存的模式,在保持标签风格一致性的同时,也保证将来开发更多互动模块时有更好的性能和更好的扩展。
|
||||
# 特点
|
||||
* 免费开源:基于APACHE 2.0开源协议,源代码完全开源;
|
||||
* 标签建站:不需要专业的后台开发技能,只要使用系统提供的标签,就能轻松建设网站;
|
||||
* 开发方便:支持在线上传模版包开发方便快捷;
|
||||
* 零代码量:真正实现“0”代码建站,后台代码一点都不需要动;
|
||||
* 每月更新:每月进行系统升级,分享更多好用的模版与插件。
|
||||
|
||||
# 面向对象
|
||||
* 政府:可以使用Dreamer CMS来快速构建政府门户;
|
||||
* 电信:可以使用Dreamer CMS来快速构建电信综合门户;
|
||||
* 企业:可以使用Dreamer CMS构建信息门户,知识管理平台,也可作为基础技术框架,是企业在创立初期很好的技术选型;
|
||||
* 个人开发者:可以使用Dreamer CMS承接外包项目;
|
||||
|
||||
# 技术框架
|
||||
* 核心框架:Spring Boot 2
|
||||
* 安全框架:Apache Shiro 1.9.1
|
||||
* 工具包:Hutool 5.8.5
|
||||
* 持久层框架:MyBatis 2.2.2
|
||||
* 日志管理:Logback
|
||||
* 模版框架:Thymeleaf
|
||||
* JS框架:jQuery,Bootstrap
|
||||
* CSS框架:Bootstrap
|
||||
* 富文本:Ueditor、editor.md
|
||||
|
||||
# 系统结构
|
||||

|
||||
|
||||
# 开发环境
|
||||
建议开发者使用以下环境,这样避免版本带来的问题
|
||||
* JDK:Jdk8
|
||||
* IDE:Spring Tool Suite 4(STS)或 IntelliJ IDEA
|
||||
* DB:Mysql 5.7
|
||||
* Redis:3.2+
|
||||
* LomBok
|
||||
|
||||
# 快速入门
|
||||
CMS包括两个部分(代码部分、资源部分)代码不多说。资源就是图片、模版等,该目录在application.yml中web.resource-path配置项目中配置。视频教程:
|
||||
```
|
||||
在线观看视频地址:
|
||||
https://space.bilibili.com/482273402
|
||||
```
|
||||
1. 克隆项目到本地工作空间
|
||||
2. 导入Eclipse或Sts等开发工具(推荐使用Spring Tools Suite 4),项目需要使用Lombok支持
|
||||
3. 项目需要Redis,请自行修改application.yml中Redis配置
|
||||
4. 修改项目资源目录,application.yml文件web.resource-path配置项(如D:/dreamer-cms/)
|
||||
5. 导入数据库src/main/resources/db/db.sql,要求Mysql5.7版本,并修改application-(dev|prd).yml中数据配置
|
||||
6. 将项目src/main/resources/db/dreamer-cms.zip文件解压,保证解压后的目录路径的名称和资源目录一致
|
||||
7. 运行项目DreamerCMSApplication.java
|
||||
8. 网站首页:http://localhost:8888 项目管理后台:http://localhost:8888/admin
|
||||
9. 管理后台用户名:wangjn;密码:123456
|
||||
10. 模版标签开发教程请参考:http://121.8.219.2:18889/
|
||||
|
||||
# 捐赠详情
|
||||
|
||||
感谢各位大佬的支持,同时也感谢各位开发者为社区作出的贡献。同时也希望更多的用户来捐赠本项目。您的支持,是我一直坚持下去的动力,另外由于开销巨大,于2025-03-15起网站及服务器不在提供演示地址、在线文档等,希望大家多多理解!!!捐赠详情请移步:http://121.8.219.2:18889/chapter10/DonationList.html
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="33.33%"><img src="http://121.8.219.2:18887/20201201174329.png" /></td>
|
||||
<td width="33.33%"><img src="http://121.8.219.2:18887/20201201174339.jpg" /></td>
|
||||
<td width="33.33%"><img src="http://121.8.219.2:18887/20230327163517.jpg" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
# 系统美图
|
||||
|
||||
<img src="http://121.8.219.2:18887/20190821102434.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821102526.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821102608.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821102712.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821102742.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821102847.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821102932.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190821103012.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190820092155.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190820092156.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190820092157.png"/>
|
||||
<img src="http://121.8.219.2:18887/20190820092158.png"/>
|
1266
docs/COPYRIGHT.html
Normal file
1266
docs/COPYRIGHT.html
Normal file
File diff suppressed because it is too large
Load Diff
1266
docs/chapter01/Designer.html
Normal file
1266
docs/chapter01/Designer.html
Normal file
File diff suppressed because it is too large
Load Diff
11
docs/chapter01/Designer.md
Normal file
11
docs/chapter01/Designer.md
Normal file
@ -0,0 +1,11 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 设计师
|
||||
|
||||
<p>能够设计、制作Dreamer CMS程序模板的人员。</p>
|
||||
|
||||
|
1266
docs/chapter01/Developer.html
Normal file
1266
docs/chapter01/Developer.html
Normal file
File diff suppressed because it is too large
Load Diff
11
docs/chapter01/Developer.md
Normal file
11
docs/chapter01/Developer.md
Normal file
@ -0,0 +1,11 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 开发者
|
||||
|
||||
<p>能够设计、制作Dreamer CMS程序模板;并助能对Dreamer CMS后台程序进行二次开发的人员。</p>
|
||||
|
||||
|
10
docs/chapter01/README.md
Normal file
10
docs/chapter01/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 模板设计师要求
|
||||
<p>本章节介绍Dreamer CMS模板制作人员所需要的基本条件、所需相关技术。便于企业、单位招聘选择适合自身发展的从业人员及对员工进行定位、培训。</p>
|
||||
|
||||
|
1266
docs/chapter01/index.html
Normal file
1266
docs/chapter01/index.html
Normal file
File diff suppressed because it is too large
Load Diff
21
docs/chapter02/README.md
Normal file
21
docs/chapter02/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 模板制作流程
|
||||
|
||||
<p>
|
||||
模板制作需要经过以下几个流程:
|
||||
</p>
|
||||
|
||||
1. 设计页面效果图,一般为PSD或者PNG格式的原图;
|
||||
2. 将页面效果图输出为HTML格式,后缀名为“.html”;
|
||||
3. 根据页面内容调用标签生成或者编写标签所需代码;
|
||||
4. 嵌套标签代码到输出页面对应位置;
|
||||
5. 测试调试模板文件,保证调用和设计效果一致;
|
||||
6. 将模板标签、文件上传到模板目录;
|
||||
7. 在系统设定模板目录,重新生成全站;
|
||||
|
||||
|
1270
docs/chapter02/index.html
Normal file
1270
docs/chapter02/index.html
Normal file
File diff suppressed because it is too large
Load Diff
1272
docs/chapter03/Description.html
Normal file
1272
docs/chapter03/Description.html
Normal file
File diff suppressed because it is too large
Load Diff
17
docs/chapter03/Description.md
Normal file
17
docs/chapter03/Description.md
Normal file
@ -0,0 +1,17 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 模板文件与功能说明
|
||||
|
||||
<p>
|
||||
DreamerCMS系统的模板是非固定的,用户可以在新建栏目时可以自行选择栏目模板,官方仅提供最基本的默认模板,即是内置系统模型的各个模板,由于Dreamer CMS支持自定义表单模型,用户自定义新表单模型后,还需要按该模型的字段设计一套新的模板。
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1278
docs/chapter03/DesignAndUse.html
Normal file
1278
docs/chapter03/DesignAndUse.html
Normal file
File diff suppressed because it is too large
Load Diff
23
docs/chapter03/DesignAndUse.md
Normal file
23
docs/chapter03/DesignAndUse.md
Normal file
@ -0,0 +1,23 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 概念,设计和使用模板
|
||||
|
||||
#### 封面模板
|
||||
<p>
|
||||
指网站主页或比较重要的栏目封面频道使用的模板(如关于我们、联系我们等),一般用“index_别名.html”命名,然后在网站后台栏目中进行设置类型为封面,封面模版为该文件名。
|
||||
</p>
|
||||
|
||||
#### 列表模板
|
||||
<p>
|
||||
指网站某个栏目的所有文章列表的模板(如新闻中心、产品中心等),一般用 “list_别名.html” 命名。
|
||||
</p>
|
||||
|
||||
#### 内容模板
|
||||
<p>
|
||||
表示文档查看页的模板,如文章模板,一般用 “article_别名.html” 命名。
|
||||
</p>
|
||||
|
1280
docs/chapter03/NamingRules.html
Normal file
1280
docs/chapter03/NamingRules.html
Normal file
File diff suppressed because it is too large
Load Diff
24
docs/chapter03/NamingRules.md
Normal file
24
docs/chapter03/NamingRules.md
Normal file
@ -0,0 +1,24 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 命名规则
|
||||
|
||||
#### 模板保存位置
|
||||
<p>
|
||||
模板目录在资源目录下,名为templates的文件夹即是模版目录。可以通过程序中application.yml中的web.resource-path配置项来配置。默认在
|
||||
<br />
|
||||
D:/dreamer-cms/templates/模版名(必须为英文,默认为default)/具体功能模板文件
|
||||
</p>
|
||||
|
||||
#### 模板文件命名规范
|
||||
* index_别名.html:表示栏目封面模板;
|
||||
* list_别名.htm:表示栏目列表模板;
|
||||
* article_别名.html:表示内容查看页(文档模板,包括专题查看页);
|
||||
* search.html:搜索结果列表模板;
|
||||
* index.html:主页模板;
|
||||
```html
|
||||
注: [别名]可以使用栏目名称的英文缩写。
|
||||
```
|
1266
docs/chapter03/Other.html
Normal file
1266
docs/chapter03/Other.html
Normal file
File diff suppressed because it is too large
Load Diff
10
docs/chapter03/Other.md
Normal file
10
docs/chapter03/Other.md
Normal file
@ -0,0 +1,10 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 其它模板说明
|
||||
<p>
|
||||
暂无
|
||||
</p>
|
22
docs/chapter03/README.md
Normal file
22
docs/chapter03/README.md
Normal file
@ -0,0 +1,22 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 模板目录
|
||||
|
||||
<p>
|
||||
系统的模板目录是可配置的,通过程序中的application.yml文件中的web.resource-path来指定资源根目录,默认为D:/dreamer-cms/,在资源根目录下templates内,便是模板目录的文件目录结构。
|
||||
</p>
|
||||
|
||||
/templates·········································································
|
||||
├─default··································································· 默认模板目录
|
||||
├─images······························································· 模板图片目录
|
||||
├─js······································································ 模板JS脚本目录
|
||||
├─fonts·································································· 模板字体目录
|
||||
├─css···································································· 模板CSS样式目录
|
||||
├─index.html··························································· 首页模板
|
||||
├─header.html························································· 页头模板
|
||||
├─footer.html··························································· 页尾模板
|
||||
└─···其它模版文件···
|
1271
docs/chapter03/index.html
Normal file
1271
docs/chapter03/index.html
Normal file
File diff suppressed because it is too large
Load Diff
1301
docs/chapter04/CoreDoc.html
Normal file
1301
docs/chapter04/CoreDoc.html
Normal file
File diff suppressed because it is too large
Load Diff
46
docs/chapter04/CoreDoc.md
Normal file
46
docs/chapter04/CoreDoc.md
Normal file
@ -0,0 +1,46 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 核心文件
|
||||
<p>
|
||||
模版引擎相关代码都在cc.iteachyou.cms.taglib包下,如下
|
||||
</p>
|
||||
|
||||
```html?linenums
|
||||
taglib
|
||||
annotation //注解包
|
||||
Tag.java //标签注解
|
||||
Attribute.java //属性注解
|
||||
enums //枚举包
|
||||
FieldEnum.java //字段正则枚举
|
||||
tags //标签解析包
|
||||
AbstractChannelTag.java
|
||||
AbstractListTag.java
|
||||
ArticleTag.java //文章标签
|
||||
AttachmentTag.java //附件标签
|
||||
CategoryTag.java //栏目标签
|
||||
ChannelArtListTag.java //栏目列表标签
|
||||
ChannelTag.java //频道标签
|
||||
GlobalTag.java //全局设置标签
|
||||
IfTag.java //判断标签
|
||||
IncludeTag.java //引入文件标签
|
||||
LabelTag.java //关键字标签
|
||||
ListTag.java //列表标签
|
||||
LocationTag.java //当前位置标签
|
||||
PageListTag.java //分页列表标签
|
||||
PaginationTag.java //分页显示标签
|
||||
PrevNextTag.java //上一篇、下一篇标签
|
||||
SqlTag.java //自定义Sql标签
|
||||
TemplateTag.java //模版目录标签
|
||||
TopCategoryTag.java //顶级栏目标签
|
||||
TypeTag.java //单个频道标签
|
||||
VariableTag.java //变量标签
|
||||
utils
|
||||
PinyinUtils.java //汉字转拼音工具类
|
||||
RegexUtil.java //正则工具类
|
||||
IParse.java //接口
|
||||
ParseEngine.java //解析引擎
|
||||
```
|
1276
docs/chapter04/Grammar.html
Normal file
1276
docs/chapter04/Grammar.html
Normal file
File diff suppressed because it is too large
Load Diff
21
docs/chapter04/Grammar.md
Normal file
21
docs/chapter04/Grammar.md
Normal file
@ -0,0 +1,21 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 模板语法
|
||||
<p>
|
||||
DreamerCMS模板引擎是一种使用XML名字空间形式的模板解析器,使用解析器解析模板的最大好处是可以轻松的制定标记的属性,感觉上就像在用HTML一样,使模板代码十分直观灵活。
|
||||
</p>
|
||||
|
||||
#### 代码样式
|
||||
<p>
|
||||
{dreamer-cms:标记名称 属性="值" /}<br />
|
||||
{dreamer-cms:标记名称 属性="值"}{/dreamer-cms:标记名称}<br />
|
||||
{dreamer-cms:标记名称 属性="值"}自定义样式模板(InnerText){/dreamer-cms:标记名称}
|
||||
</p>
|
||||
|
||||
```html?linenums
|
||||
注:模板的标记,必须严格用{dreamer-cms:标记名称 属性="值"}{/dreamer-cms:标记名称} 这种格式,否则会报错。
|
||||
```
|
1280
docs/chapter04/LabelCategory.html
Normal file
1280
docs/chapter04/LabelCategory.html
Normal file
File diff suppressed because one or more lines are too long
30
docs/chapter04/LabelCategory.md
Normal file
30
docs/chapter04/LabelCategory.md
Normal file
@ -0,0 +1,30 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 标签分类
|
||||
<p>
|
||||
每个标签都会有他的作用域,我们已经了解系统文档页面可以分为:封面、列表、内容几个部分,每个页面的模板则会涉及到不同的标签,所以标签也有了他的作用域,我们在模板制作过程中主要根据模板的作用域来对模板进行如下划分:
|
||||
</p>
|
||||
|
||||
#### 全局标签
|
||||
<p>
|
||||
可以在前台文档任意页面使用的模板标记,例如:global、variable、type、template、list、channel、categoryartlist、include等。
|
||||
</p>
|
||||
|
||||
#### 分页标签
|
||||
<p>
|
||||
可以在除首页外的其它任意模板中使用的标签,例如:category、topcategory、location。
|
||||
</p>
|
||||
|
||||
#### 列表标签
|
||||
<p>
|
||||
仅在模板*_list.htm中可以使用的标签,例如:pagelist、pagination。
|
||||
</p>
|
||||
|
||||
#### 内容标签
|
||||
<p>
|
||||
仅在模板*_.article.html中可以使用的模板标记,例如:article。
|
||||
</p>
|
10
docs/chapter04/README.md
Normal file
10
docs/chapter04/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 模板引擎介绍
|
||||
<p>
|
||||
Dreamer CMS从2.0.0版本开始采用了解析式引擎与编译式引擎并存的模式,由于在生成HTML时,解析式引擎拥有巨大的优势,但对于动态浏览的互动性质的页面,编译式引擎更实用高效,Dreamer CMS采用双引擎并存的模式,在保持标签风格一致性的同时,也保证将来开发更多互动模块时有更好的性能。
|
||||
</p>
|
1266
docs/chapter04/index.html
Normal file
1266
docs/chapter04/index.html
Normal file
File diff suppressed because it is too large
Load Diff
1429
docs/chapter05/ArticleLabel.html
Normal file
1429
docs/chapter05/ArticleLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
105
docs/chapter05/ArticleLabel.md
Normal file
105
docs/chapter05/ArticleLabel.md
Normal file
@ -0,0 +1,105 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Article文章页标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
文章页标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签是用于在文章内容页显示当前文章信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:article field="title" /}
|
||||
或
|
||||
{dreamer-cms:article field="title" function="substring|format" /}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.ArticleTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
field|字段名
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
id|文章ID
|
||||
title|标题
|
||||
properties|文章属性(头条h加粗b幻灯f图片b)
|
||||
litpic|缩略图
|
||||
tag|文章标签
|
||||
remark|文章描述
|
||||
categoryid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
comment|是否允许评论
|
||||
subscribe|是否允许订阅
|
||||
clicks|点击数
|
||||
weight|权重(可以利用该字段来排序)
|
||||
status|状态
|
||||
createby|发布人
|
||||
realname|发布人真实姓名
|
||||
username|发布人用户名
|
||||
createtime|发布时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
arcurl|文章访问URL
|
||||
***|其它附加字段(需要配合自定义表单)
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-12 mx-auto">
|
||||
<div class="post post-card">
|
||||
<div class="single-post-header">
|
||||
<div class="post-tag">{dreamer-cms:article field="createtime" /}</div>
|
||||
<h1>{dreamer-cms:article field="title" /}</h1>
|
||||
<ul class="list-inline blog-item-links">
|
||||
<li class="list-inline-item">{dreamer-cms:article field="tag" /}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="templates-details">
|
||||
<a href="javascript:void(0)" class="post-image" ><img src="{dreamer-cms:article field='litpic' /}" alt="#" class="img-fluid featured-img"></a>
|
||||
{dreamer-cms:article field="body" /}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1362
docs/chapter05/AttachmentLabel.html
Normal file
1362
docs/chapter05/AttachmentLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
77
docs/chapter05/AttachmentLabel.md
Normal file
77
docs/chapter05/AttachmentLabel.md
Normal file
@ -0,0 +1,77 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Attachment附件标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
附件标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于在页面中展示指定的附件,可用于下载功能。
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:attachment key="ez159g51"}
|
||||
<a href="[field:dlurl /]" target="_blank" class="btn btn-primary main-btn bg-main">一键运行版下载</a>
|
||||
{/dreamer-cms:attachment}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:filename function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.AttachmentTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
key|后台附件管理中的编码,通过唯一编码,获取指定附件
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
id|附件ID
|
||||
filename|附件名称
|
||||
filetype|附件类型(为MultipartFile类的ContentType)
|
||||
filesize|附件大小
|
||||
dlurl|下载连接
|
||||
createby|创建人
|
||||
createtime|创建时间
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:attachment key="ez159g51"}
|
||||
<a href="[field:dlurl /]" target="_blank" class="btn btn-primary main-btn bg-main">一键运行版下载</a>
|
||||
{/dreamer-cms:attachment}
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1340
docs/chapter05/CategoryArtListLabel.html
Normal file
1340
docs/chapter05/CategoryArtListLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
76
docs/chapter05/CategoryArtListLabel.md
Normal file
76
docs/chapter05/CategoryArtListLabel.md
Normal file
@ -0,0 +1,76 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### CategoryArtListLabel栏目内容列表标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
栏目内容列表标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签是系统中唯一的一个支持嵌套的标签,这个标签通常使用在首页(含封面首页),用于输出一组栏目内容列表,主要用于获取下级栏目的内容列表标签并适用于所有模版,通常用于网站内容列表等信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:categoryartlist length="1"}
|
||||
{dreamer-cms:if test="('true' eq [field:haschildren/])"}
|
||||
<li><a href="[field:typeurl/]">[field:typenamecn /]</a>
|
||||
<ul>
|
||||
{dreamer-cms:channel}
|
||||
<li><a href="[field:typeurl/]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:channel}
|
||||
</ul>
|
||||
</li>
|
||||
{/dreamer-cms:if}
|
||||
{/dreamer-cms:categoryartlist}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.ChannelArtListTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
typeid|后台栏目管理列表页面中的编码,通过唯一编码,获取指定栏目
|
||||
length|获取个数
|
||||
showall|是否获取全部栏目(包括隐藏栏目)showall="1"
|
||||
|
||||
#### 底层字段
|
||||
参照channel和list标签返回字段说明
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<ul class="nav navbar-nav mr-auto">
|
||||
<li class="nav-item active"><a class="nav-link scroll" href="/">首页</a></li>
|
||||
{dreamer-cms:categoryartlist length="1"}
|
||||
{dreamer-cms:if test="('true' eq [field:haschildren/])"}
|
||||
<li class="dropdown nav-item"><a href="[field:typeurl/]" class="nav-link dropdown-toggle" data-toggle="dropdown">[field:typenamecn /]</a>
|
||||
<ul class="dropdown-menu">
|
||||
{dreamer-cms:channel}
|
||||
<li><a class="dropdown-item" href="[field:typeurl/]"><i class="ion ion-chevron-right"></i>[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:channel}
|
||||
</ul>
|
||||
</li>
|
||||
{/dreamer-cms:if}
|
||||
{dreamer-cms:if test="('false' eq [field:haschildren/])"}
|
||||
<li class="nav-item"><a class="nav-link scroll" href="[field:typeurl /]" title="[field:typenamecn /]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:if}
|
||||
{/dreamer-cms:categoryartlist}
|
||||
</ul>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1451
docs/chapter05/CategoryLabel.html
Normal file
1451
docs/chapter05/CategoryLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
103
docs/chapter05/CategoryLabel.md
Normal file
103
docs/chapter05/CategoryLabel.md
Normal file
@ -0,0 +1,103 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Category分页栏目标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
分页栏目标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签是用于在分页(封面页面和列表页面和文章页面)调用当前栏目信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:category field="typenamecn" /}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:typenamecn function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.CategoryTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
field|字段名
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
typeid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
typecode|栏目编码(8位唯一)
|
||||
typeseq|栏目的层级
|
||||
typeimg|栏目图片
|
||||
description|栏目描述
|
||||
linktarget|链接目标
|
||||
pagesize|分页大小(该属性控制列表页面默认的分页大小)
|
||||
visiturl|访问URL(浏览器地址栏中将以该url显示,如果为空,则为栏目中文名称的拼音)
|
||||
linkurl|链接URL
|
||||
editor|编辑器(md或ue)
|
||||
mdcontent|markdown内容
|
||||
htmlcontent|生成的html内容
|
||||
parentid|上级栏目ID
|
||||
parentname|上级栏目名称
|
||||
isshow|是否显示
|
||||
level|栏目层级
|
||||
sort|排序(默认为50)
|
||||
createby|创建人
|
||||
createtime|创建时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
typeurl|栏目URL
|
||||
ext01|扩展字段1
|
||||
ext02|扩展字段2
|
||||
ext03|扩展字段3
|
||||
ext04|扩展字段4
|
||||
ext05|扩展字段5
|
||||
haschildren|是否有下级栏目(该属性在dreamer-cms:type标签下不可用)
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<section class="page-header d-flex align-items-center">
|
||||
<div class="container-fluid">
|
||||
<div class="page-header-content text-center">
|
||||
<div class="page-header-tag">{dreamer-cms:global name="title" /}</div>
|
||||
<div class="page-header-title">{dreamer-cms:category field="typenamecn" /}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1482
docs/chapter05/ChannelLabel.html
Normal file
1482
docs/chapter05/ChannelLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
119
docs/chapter05/ChannelLabel.md
Normal file
119
docs/chapter05/ChannelLabel.md
Normal file
@ -0,0 +1,119 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Channel频道列表标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
栏目标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
常用标记,通常用于网站顶部以获取站点栏目信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:channel typeid="TNLESKZ4" showall="true" type="son"}
|
||||
<li><a href="[field:typeurl/]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:channel}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:typenamecn function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
或
|
||||
[field:autoindex function="steps(5,1)" /]
|
||||
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
3. function="steps(参数1, 参数2)"
|
||||
函数说明:指定autoindex的起始序号以及步长
|
||||
参数1:起始序号
|
||||
参数2:步长
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.ChannelTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
typeid|后台栏目管理列表页面中的编码,通过唯一编码,获取指定栏目
|
||||
start|从第几个开始获取
|
||||
length|获取个数
|
||||
type|显示类型(top为顶级栏目,son在设置typeid时起作用,获取指定栏目的下级栏目)
|
||||
showall|是否显示隐藏栏目(true或false)
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
typeid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
typecode|栏目编码(8位唯一)
|
||||
typeseq|栏目的层级
|
||||
typeimg|栏目图片
|
||||
description|栏目描述
|
||||
linktarget|链接目标
|
||||
pagesize|分页大小(该属性控制列表页面默认的分页大小)
|
||||
visiturl|访问URL(浏览器地址栏中将以该url显示,如果为空,则为栏目中文名称的拼音)
|
||||
linkurl|链接URL
|
||||
editor|编辑器(md或ue)
|
||||
mdcontent|markdown内容
|
||||
htmlcontent|生成的html内容
|
||||
parentname|上级栏目名称
|
||||
isshow|是否显示
|
||||
level|栏目层级
|
||||
sort|排序(默认为50)
|
||||
createby|创建人
|
||||
createtime|创建时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
typeurl|栏目URL
|
||||
ext01|扩展字段1
|
||||
ext02|扩展字段2
|
||||
ext03|扩展字段3
|
||||
ext04|扩展字段4
|
||||
ext05|扩展字段5
|
||||
haschildren|是否有下级栏目(该属性在dreamer-cms:type标签下不可用)
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<div class="popup" id="popup">
|
||||
<div class="popup-content"><div class="left-slide-sidebar ">
|
||||
<div class="canvas-title">DreamerCMS MENUS</div>
|
||||
<ul class="list-unstyled slide-sidebar">
|
||||
<li><a href="#">首页</a></li>
|
||||
{dreamer-cms:channel type='top' currentstyle=""}
|
||||
<li><a href="[field:typeurl /]" title="[field:typenamecn /]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:channel}
|
||||
</ul>
|
||||
</div>
|
||||
<a href="#close" class="popup-close">×</a>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1368
docs/chapter05/GlobalLabel.html
Normal file
1368
docs/chapter05/GlobalLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
81
docs/chapter05/GlobalLabel.md
Normal file
81
docs/chapter05/GlobalLabel.md
Normal file
@ -0,0 +1,81 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Global全局配置标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
全局配置标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于获取系统后台系统设置中的配置信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:global name="title" /}
|
||||
或
|
||||
{dreamer-cms:global name="title"}{/dreamer-cms:global}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.GlobalTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
name|系统设置中的配置信息的Key
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
website|网站地址
|
||||
title|网站标题
|
||||
keywords|网站关键字
|
||||
describe|网站描述
|
||||
icp|网站备案号
|
||||
copyright|网站版权
|
||||
uploaddir|网站上传目录
|
||||
appid|暂无作用
|
||||
appkey|暂无作用
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-6 col-sm-5 align-self-center">
|
||||
<div>
|
||||
<p>
|
||||
{dreamer-cms:global name="copyright" /}
|
||||
备案号:{dreamer-cms:global name="icp" /}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-7 col-md-6 col-sm-7 align-self-center">
|
||||
<ul class="list-inline footer-menu">
|
||||
{dreamer-cms:channel type='top' currentstyle=""}
|
||||
<li class="list-inline-item"><a href="[field:typeurl /]" title="[field:typenamecn /]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:channel}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1316
docs/chapter05/IfLabel.html
Normal file
1316
docs/chapter05/IfLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
64
docs/chapter05/IfLabel.md
Normal file
64
docs/chapter05/IfLabel.md
Normal file
@ -0,0 +1,64 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### If判断标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
判断标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于在页面中作简单的判断,目前只支持eq和neq,且只用于在categoryartlist标签内使用。
|
||||
</p>
|
||||
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:if test="('false' eq [field:haschildren/])"}
|
||||
<li><a ref="[field:typeurl /]" title="[field:typenamecn /]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:if}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.IfTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
test|表达式(注:一定要用小括号包裹,目前只支持eq和neq。)
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:categoryartlist length="1"}
|
||||
{dreamer-cms:if test="('true' eq [field:haschildren/])"}
|
||||
<li class="dropdown nav-item"><a href="[field:typeurl/]" class="nav-link dropdown-toggle" data-toggle="dropdown">[field:typenamecn /]</a>
|
||||
<ul class="dropdown-menu">
|
||||
{dreamer-cms:channel}
|
||||
<li><a class="dropdown-item" href="[field:typeurl/]"><i class="ion ion-chevron-right"></i>[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:channel}
|
||||
</ul>
|
||||
</li>
|
||||
{/dreamer-cms:if}
|
||||
{dreamer-cms:if test="('false' eq [field:haschildren/])"}
|
||||
<li class="nav-item"><a class="nav-link scroll" href="[field:typeurl /]" title="[field:typenamecn /]">[field:typenamecn /]</a></li>
|
||||
{/dreamer-cms:if}
|
||||
{/dreamer-cms:categoryartlist}
|
||||
```
|
||||
|
||||
#### 效果
|
||||
无
|
1308
docs/chapter05/IncludeLabel.html
Normal file
1308
docs/chapter05/IncludeLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
50
docs/chapter05/IncludeLabel.md
Normal file
50
docs/chapter05/IncludeLabel.md
Normal file
@ -0,0 +1,50 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Include引入文件标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
引入文件标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于引入其它模板的内容,以方便拆分头部、尾部等公共部分
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:include file='header.html'/}
|
||||
或
|
||||
{dreamer-cms:include file="header.html"}{/dreamer-cms:include}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.IncludeTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
file|要引入的模版文件名称
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:include file='header.html'/}
|
||||
```
|
||||
|
||||
#### 效果
|
||||
无
|
1462
docs/chapter05/ListLabel.html
Normal file
1462
docs/chapter05/ListLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
112
docs/chapter05/ListLabel.md
Normal file
112
docs/chapter05/ListLabel.md
Normal file
@ -0,0 +1,112 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### List文章列表标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
文章列表标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于获取栏目下的文章
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:list typeid="A54547W2" pagenum="0" pagesize="8" flag="p"}
|
||||
<a href="[field:arcurl/]">[field:title /]</a>
|
||||
{/dreamer-cms:list}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:title function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
或
|
||||
[field:autoindex function="steps(5,1)" /]
|
||||
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
3. function="steps(参数1, 参数2)"
|
||||
函数说明:指定autoindex的起始序号以及步长
|
||||
参数1:起始序号
|
||||
参数2:步长
|
||||
```
|
||||
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.ListTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
typeid|后台栏目管理列表页面中的编码,通过唯一编码,获取指定栏目
|
||||
pagenum|页数
|
||||
pagesize|获取数量
|
||||
flag|文章属性(p图片)
|
||||
cascade|是否显示该栏目的下级栏目的文章
|
||||
addfields|附加字段,多个字段间用英文逗号分隔
|
||||
formkey|表单模型的编码(可以在后台表单管理列表中获取)
|
||||
sortWay|排序方式(asc或desc)
|
||||
sortBy|排序字段(数据库中字段名)
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
autoindex|序号(从1开始)
|
||||
id|文章ID
|
||||
title|标题
|
||||
properties|文章属性(头条h加粗b幻灯f图片b)
|
||||
litpic|缩略图
|
||||
hasthumbnail|是否有缩略图(有输出yes-thumbnail;无输出no-thumbnail)<br />可用于Css的class名,从而实现动态的输出列表样式
|
||||
tag|文章标签
|
||||
remark|文章描述
|
||||
categoryid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
comment|是否允许评论
|
||||
subscribe|是否允许订阅
|
||||
clicks|点击数
|
||||
weight|权重(可以利用该字段来排序)
|
||||
status|状态
|
||||
createby|发布人
|
||||
createtime|发布时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
arcurl|文章访问URL
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:list typeid="A54547W2" pagenum="1" pagesize="4" flag="p"}
|
||||
<div class="col-lg-3 col-md-4 col-sm-6">
|
||||
<div class="feature-wrap">
|
||||
<div class="feature-image"><img src="[field:litpic /]" class="ion ion-ios-cloud-outline"></i></div>
|
||||
<a href="[field:arcurl/]">[field:title function="substring(0,100,'...')" /]</a>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
{/dreamer-cms:list}
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1309
docs/chapter05/LocationLabel.html
Normal file
1309
docs/chapter05/LocationLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
58
docs/chapter05/LocationLabel.md
Normal file
58
docs/chapter05/LocationLabel.md
Normal file
@ -0,0 +1,58 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### If判断标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_4.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
当前位置标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签用于在分页(封面页面和列表页面和文章页面)页面中展示当前位置
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:location lang="cn" /}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.LocationTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
lang|语言(cn或en)用于展示中文名称或英文名称
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:location lang="cn" /}
|
||||
```
|
||||
|
||||
#### 效果
|
||||
会返回当前位置html片段,样式可自行控制,如
|
||||
```html?linenums
|
||||
<ul class="dreamer-location">
|
||||
<li>
|
||||
<a href="/" title="首页">首页</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/" title="更新记录">更新记录</a>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
1450
docs/chapter05/PageListLabel.html
Normal file
1450
docs/chapter05/PageListLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
120
docs/chapter05/PageListLabel.md
Normal file
120
docs/chapter05/PageListLabel.md
Normal file
@ -0,0 +1,120 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### PageList文章分页标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
文章分页标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签是用于在列表页面调用文章列表并显示分页信息。一般该标签配合{dreamer-cms:pagination /}共同使用
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:pagelist}
|
||||
<li><a href="#"><i class="ion ion-calendar"></i>[field:createtime/]</a></li>
|
||||
{/dreamer-cms:pagelist}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:title function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
或
|
||||
[field:autoindex function="steps(5,1)" /]
|
||||
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
3. function="steps(参数1, 参数2)"
|
||||
函数说明:指定autoindex的起始序号以及步长
|
||||
参数1:起始序号
|
||||
参数2:步长
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.PageListTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
formkey|表单模型的编码
|
||||
addfields|附加字段(该字段须设置了formkey后生效)
|
||||
cascade|是否显示该栏目的下级栏目的文章
|
||||
sortWay|排序方式(asc或desc)
|
||||
sortBy|排序字段(数据库中字段名)
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
autoindex|序号(从1开始)
|
||||
id|文章ID
|
||||
title|标题
|
||||
properties|文章属性(头条h加粗b幻灯f图片b)
|
||||
litpic|缩略图
|
||||
tag|文章标签
|
||||
remark|文章描述
|
||||
categoryid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
comment|是否允许评论
|
||||
subscribe|是否允许订阅
|
||||
clicks|点击数
|
||||
weight|权重(可以利用该字段来排序)
|
||||
status|状态
|
||||
createby|发布人
|
||||
createtime|发布时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
arcurl|文章访问URL
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<div class="row">
|
||||
{dreamer-cms:pagelist formkey="LUVC0AW2" addfields="versionnum,notes"}
|
||||
<div class="col-lg-4 col-md-6 col-sm-6">
|
||||
<div class="blog-post">
|
||||
<div class="blog-details">
|
||||
<ul class="list-inline blog-item-links">
|
||||
<li class="list-inline-item"><a href="#"><i class="ion ion-calendar"></i>版本号:[field:versionnum/]</a></li>
|
||||
<li class="list-inline-item"><a href="#"><i class="ion ion-chatbubbles"></i>点击:[field:clicks/]</a></li>
|
||||
</ul>
|
||||
<a href="[field:arcurl/]"><h4 class="media-heading">[field:title/]</h4></a>
|
||||
<p class="product-para">版本号:[field:versionnum/]</p>
|
||||
<p class="product-para">发布日期:[field:createtime/]</p>
|
||||
<a href="[field:arcurl/]" class="blog-post-link">查看详情 <i class="fa fa-angle-double-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/dreamer-cms:pagelist}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
{dreamer-cms:pagination /}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1286
docs/chapter05/PaginationLabel.html
Normal file
1286
docs/chapter05/PaginationLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
44
docs/chapter05/PaginationLabel.md
Normal file
44
docs/chapter05/PaginationLabel.md
Normal file
@ -0,0 +1,44 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Pagination显示分页标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
显示分页标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签是用于在列表页面显示分页信息。一般该标签配合{dreamer-cms:pagelist}共同使用
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:pagination /}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.PaginationTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
无
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
参照 [PageList文章分页标签](/chapter05/PageListLabel.md)
|
||||
|
||||
#### 效果
|
||||
无
|
1318
docs/chapter05/PrevNextLabel.html
Normal file
1318
docs/chapter05/PrevNextLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
61
docs/chapter05/PrevNextLabel.md
Normal file
61
docs/chapter05/PrevNextLabel.md
Normal file
@ -0,0 +1,61 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### PrevNext上一篇、下一篇标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
上一篇、下一篇标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于在文章详情页面展示上一篇、下一篇
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:prevnext layout="prev,next" /}
|
||||
或
|
||||
{dreamer-cms:prevnext layout="prev,next"}{/dreamer-cms:prevnext}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.PrevNextTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
layout|要展示上一篇、下一篇的布局,可选项[prev/next/prev,next]
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:prevnext layout="prev,next" /}
|
||||
```
|
||||
|
||||
#### 效果
|
||||
会返回上一篇、下一篇html片段,样式可自行控制,如
|
||||
```html?linenums
|
||||
<ul class='dreamer-prevnext'>
|
||||
<li class='dreamer-prev'>
|
||||
<span class='dreamer-prevnext-label'>上一篇:</span>
|
||||
<a href='/article/7a4bc5cade9845bbb2528783d995ce20' title='智慧校园管理系统平台组成内容有哪些'>智慧校园管理系统平台组成内容有哪些</a>
|
||||
</li>
|
||||
<li class='dreamer-next'>
|
||||
<span class='dreamer-prevnext-label'>下一篇:没有了</span>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
1314
docs/chapter05/SqlLabel.html
Normal file
1314
docs/chapter05/SqlLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
56
docs/chapter05/SqlLabel.md
Normal file
56
docs/chapter05/SqlLabel.md
Normal file
@ -0,0 +1,56 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Sql标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_3.5.1 +
|
||||
</p>
|
||||
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
自定义Sql标签
|
||||
</p>
|
||||
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于在页面中作简单的查询,例如获取某栏目下的单个文章,可以在后台文章列表页面,复制文章ID,写在Sql中。注:Sql中的单引号须转义成[]来实现。
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:sql sql="select username as username,sex from system_user where id = [1]"}
|
||||
<div>[field:username /]</div>
|
||||
{/dreamer-cms:sql}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.SqlTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
sql|sql语句,注:Sql中的单引号须转义成[]来实现。
|
||||
|
||||
#### 底层字段
|
||||
底层字段取决于查询的字段,查询语句中如有用到as别名,则使用[field:别名 /]来获取;如没用到别名,则使用真实字段名[field:真实字段名 /]来获取。
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:sql sql="select username as username,sex from system_user where id = [1]"}
|
||||
<div>[field:username /]</div>
|
||||
{/dreamer-cms:sql}
|
||||
```
|
||||
|
||||
#### 效果
|
||||
无
|
1347
docs/chapter05/TagLabel.html
Normal file
1347
docs/chapter05/TagLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
63
docs/chapter05/TagLabel.md
Normal file
63
docs/chapter05/TagLabel.md
Normal file
@ -0,0 +1,63 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### If判断标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
标签列表标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于在页面中展示文章标签列表
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:label start="0" length="8"}
|
||||
<a href="#">
|
||||
[field:tagname /]
|
||||
</a>
|
||||
{/dreamer-cms:label}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.LabelTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
start|从第几个开始获取
|
||||
length|获取个数
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
autoindex|序号
|
||||
id|标签ID
|
||||
tagname|标签名称
|
||||
tagfirstchar|标签首字母
|
||||
tagpinyin|标签拼音
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:label start="0" length="8"}
|
||||
<a href="#">
|
||||
[field:tagname /]
|
||||
</a>
|
||||
{/dreamer-cms:label}
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1303
docs/chapter05/TemplateLabel.html
Normal file
1303
docs/chapter05/TemplateLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
56
docs/chapter05/TemplateLabel.md
Normal file
56
docs/chapter05/TemplateLabel.md
Normal file
@ -0,0 +1,56 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Template全局变量标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
模版路径标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于获取系统模版所在的根目录
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:template /}bootstrap/css/bootstrap.min.css
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.TemplateTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
无
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<link rel="stylesheet" href="{dreamer-cms:template /}bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="{dreamer-cms:template /}css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="{dreamer-cms:template /}plugins/slick/slick.css">
|
||||
<link rel="stylesheet" href="{dreamer-cms:template /}plugins/slick/slick-theme.css">
|
||||
<link rel="stylesheet" href="{dreamer-cms:template /}css/app.css">
|
||||
<link rel="stylesheet" href="{dreamer-cms:template /}css/responsive.css">
|
||||
<script src="{dreamer-cms:template /}js/jquery-3.2.1.slim.min.js"></script>
|
||||
<script src="{dreamer-cms:template /}bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="{dreamer-cms:template /}js/popper.min.js"></script>
|
||||
<script src="{dreamer-cms:template /}plugins/slick/slick.min.js"></script>
|
||||
<script src="{dreamer-cms:template /}js/app.js"></script>
|
||||
```
|
||||
|
||||
#### 效果
|
||||
无
|
1449
docs/chapter05/TopCategoryLabel.html
Normal file
1449
docs/chapter05/TopCategoryLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
94
docs/chapter05/TopCategoryLabel.md
Normal file
94
docs/chapter05/TopCategoryLabel.md
Normal file
@ -0,0 +1,94 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### TopCategory分页顶级栏目标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_4.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
分页顶级栏目标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签是用于在分页(封面页面和列表页面和文章页面)调用当前栏目所属顶级栏目信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:topcategory field="typenamecn" /}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:typenamecn function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
|
||||
function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.TopCategoryTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
field|字段名
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
typeid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
typecode|栏目编码(8位唯一)
|
||||
typeseq|栏目的层级
|
||||
typeimg|栏目图片
|
||||
description|栏目描述
|
||||
linktarget|链接目标
|
||||
pagesize|分页大小(该属性控制列表页面默认的分页大小)
|
||||
visiturl|访问URL(浏览器地址栏中将以该url显示,如果为空,则为栏目中文名称的拼音)
|
||||
linkurl|链接URL
|
||||
editor|编辑器(md或ue)
|
||||
mdcontent|markdown内容
|
||||
htmlcontent|生成的html内容
|
||||
parentid|上级栏目ID
|
||||
parentname|上级栏目名称
|
||||
isshow|是否显示
|
||||
level|栏目层级
|
||||
sort|排序(默认为50)
|
||||
createby|创建人
|
||||
createtime|创建时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
typeurl|栏目URL
|
||||
ext01|扩展字段1
|
||||
ext02|扩展字段2
|
||||
ext03|扩展字段3
|
||||
ext04|扩展字段4
|
||||
ext05|扩展字段5
|
||||
haschildren|是否有下级栏目(该属性在dreamer-cms:type标签下不可用)
|
||||
|
||||
#### 范例
|
||||
使用方法参照CategoryLabel
|
||||
|
||||
#### 效果
|
||||
无
|
1362
docs/chapter05/TreeLabel.html
Normal file
1362
docs/chapter05/TreeLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
105
docs/chapter05/TreeLabel.md
Normal file
105
docs/chapter05/TreeLabel.md
Normal file
@ -0,0 +1,105 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Tree栏目树标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_4.1.3 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
栏目树标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
该标签用于在页面中展示栏目树标签
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:tree root="A54547W2"}{/dreamer-cms:tree}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.TreeTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
root|根节点栏目的编码(-1为顶级栏目)
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
{dreamer-cms:tree root="A54547W2" /}
|
||||
```
|
||||
|
||||
#### 效果
|
||||
会返回栏目树html片段,样式可自行控制,如
|
||||
```html?linenums
|
||||
<ul class='dreamer-tree'>
|
||||
<li class='dreamer-tree-root'>
|
||||
<div class='dreamer-tree-root-div'>
|
||||
<a href='/list-1hq8501w/jiejuefangan/1/20' title='解决方案'>解决方案</a>
|
||||
<ul class='dreamer-tree-children'>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'>
|
||||
<a href='/cover-ghx3glm1/zhengfu' title='政府'>政府</a>
|
||||
<ul class='dreamer-tree-children'>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-053xm0pt/tuidongjingjizengzhanghefazhan' title='推动经济增长和发展'>推动经济增长和发展</a></div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-6jxfu5dd/jianshekechixufazhanweilai' title='建设可持续发展未来'>建设可持续发展未来</a></div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-tj129c0d/tigonganquankekaodefuwu' title='提供安全可靠的服务'>提供安全可靠的服务</a></div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-f53449nw/shixiangexinghuashuzitiyan' title='实现个性化数字体验'>实现个性化数字体验</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-051fu5ij/xiehui' title='协会'>协会</a>
|
||||
<ul class='dreamer-tree-children'>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-t6vvi4a9/liuchengfansuofuza' title='流程繁琐复杂'>流程繁琐复杂</a></div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-65gl4ltz/hudongchangjingdanyi' title='互动场景单一'>互动场景单一</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-0n629d19/qiye' title='企业'>企业</a>
|
||||
<ul class='dreamer-tree-children'>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-rx9e963g/jiakuaininchenggongbufa' title='加快您成功步伐'>加快您成功步伐</a></div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-14a3rjst/jianhuaanquanbaohu' title='简化安全保护'>简化安全保护</a></div>
|
||||
</li>
|
||||
<li class='dreamer-tree-node'>
|
||||
<div class='dreamer-tree-node-div'><a href='/cover-nky008yg/baohunindeweilai' title='保护您的未来'>保护您的未来</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
```
|
1454
docs/chapter05/TypeLabel.html
Normal file
1454
docs/chapter05/TypeLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
103
docs/chapter05/TypeLabel.md
Normal file
103
docs/chapter05/TypeLabel.md
Normal file
@ -0,0 +1,103 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Type栏目调用标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
栏目调用标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于获取指定栏目的内容
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:type typeid="A54547W2"}
|
||||
<div class="text-center"><a href="[field:typeurl/]">查看更多</a></div>
|
||||
{/dreamer-cms:type}
|
||||
```
|
||||
|
||||
#### 函数介绍
|
||||
```html?linenums
|
||||
使用示例:
|
||||
[field:typenamecn function="substring(0,50,'...')" /]
|
||||
或
|
||||
[field:createtime function="format('yyyy-MM-dd')" /]
|
||||
|
||||
1. function="substring(参数1,参数2,参数3)"
|
||||
函数说明:截取字段为指定长度,function="",必须为双引号包裹。
|
||||
参数1:开始截取的位置
|
||||
参数2:截取长度
|
||||
参数3:替换字符,如...。注:参数3需要用英文单引号包裹,例:'...'
|
||||
2. function="format(参数)"
|
||||
函数说明:格式化日期数据为指定格式
|
||||
参数:格式化字符串,参照SimpleDateFormat类,注:参数需要用英文单引号包裹,例:'yyyy-MM-dd'
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.TypeTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
typeid|后台栏目管理列表页面中的编码,通过唯一编码,获取指定栏目
|
||||
|
||||
#### 底层字段
|
||||
字段名|描述
|
||||
:--:|:--
|
||||
typeid|栏目ID
|
||||
typenamecn|栏目中文名称
|
||||
typenameen|栏目英文名称
|
||||
typecode|栏目编码(8位唯一)
|
||||
typeseq|栏目的层级
|
||||
typeimg|栏目图片
|
||||
description|栏目描述
|
||||
linktarget|链接目标
|
||||
pagesize|分页大小(该属性控制列表页面默认的分页大小)
|
||||
visiturl|访问URL(浏览器地址栏中将以该url显示,如果为空,则为栏目中文名称的拼音)
|
||||
linkurl|链接URL
|
||||
editor|编辑器(md或ue)
|
||||
mdcontent|markdown内容
|
||||
htmlcontent|生成的html内容
|
||||
parentname|上级栏目名称
|
||||
isshow|是否显示
|
||||
level|栏目层级
|
||||
sort|排序(默认为50)
|
||||
createby|创建人
|
||||
createtime|创建时间
|
||||
updateby|更新人
|
||||
updatetime|更新时间
|
||||
typeurl|栏目URL
|
||||
ext01|扩展字段1
|
||||
ext02|扩展字段2
|
||||
ext03|扩展字段3
|
||||
ext04|扩展字段4
|
||||
ext05|扩展字段5
|
||||
haschildren|是否有下级栏目(该属性在dreamer-cms:type标签下不可用)
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<div class="row">
|
||||
<div class="col-12 mt-5">
|
||||
{dreamer-cms:type typeid="A54547W2"}
|
||||
<div class="text-center"><a href="[field:typeurl/]" class="btn btn-primary main-btn btn-reload"><i class="fa fa-spinner fa-spin"></i> 查看更多</a></div>
|
||||
{/dreamer-cms:type}
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
1327
docs/chapter05/VariableLabel.html
Normal file
1327
docs/chapter05/VariableLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
69
docs/chapter05/VariableLabel.md
Normal file
69
docs/chapter05/VariableLabel.md
Normal file
@ -0,0 +1,69 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### Variable全局变量标签
|
||||
|
||||
#### 适用版本
|
||||
<p>
|
||||
Previous_Releases_2.0.0 +
|
||||
</p>
|
||||
|
||||
#### 名称
|
||||
<p>
|
||||
全局变量标签
|
||||
</p>
|
||||
|
||||
#### 功能
|
||||
<p>
|
||||
用于获取系统后台变量管理中的配置信息
|
||||
</p>
|
||||
|
||||
#### 语法
|
||||
```html?linenums
|
||||
{dreamer-cms:variable name='cfg_gitee_addr'/}
|
||||
或
|
||||
{dreamer-cms:variable name='cfg_gitee_addr'}{/dreamer-cms:variable}
|
||||
```
|
||||
|
||||
#### 文件
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.tags.VariableTag
|
||||
```
|
||||
|
||||
#### 参数
|
||||
参数名|描述
|
||||
:--:|:--
|
||||
name|变量管理中的变量名
|
||||
|
||||
#### 底层字段
|
||||
无
|
||||
|
||||
#### 范例
|
||||
```html?linenums
|
||||
<section id="action" class="call-to-action-2">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="call-to-action-wrap">
|
||||
<div class="call-to-action-title">
|
||||
<div class="text-center"><a href="{dreamer-cms:variable name='cfg_gitee_addr'/}" class="btn btn-primary main-btn">源码下载</a></div>
|
||||
<h3>梦想家CMS内容管理系统支持码云、Github等多种渠道下载。</h3>
|
||||
</div>
|
||||
<div class="list-wrap">
|
||||
<ul class="list-inline applications">
|
||||
<li class="list-inline-item"><a href="{dreamer-cms:variable name='cfg_gitee_addr'/}"><img src="{dreamer-cms:template /}images/app1.png" alt="Application"></a></li>
|
||||
<li class="list-inline-item"><a href="{dreamer-cms:variable name='cfg_github_addr'/}"><img src="{dreamer-cms:template /}images/app2.png" alt="Application"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
```
|
||||
|
||||
#### 效果
|
||||

|
2996
docs/chapter06/DataBase.html
Normal file
2996
docs/chapter06/DataBase.html
Normal file
File diff suppressed because it is too large
Load Diff
312
docs/chapter06/DataBase.md
Normal file
312
docs/chapter06/DataBase.md
Normal file
@ -0,0 +1,312 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
|
||||
### 1. system_setting(网站配置表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|--------------|----|----------|----------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| website | varchar(128) | | | 网址 |
|
||||
| title | varchar(64) | | | 网站标题 |
|
||||
| keywords | varchar(128) | | | 网站关键字 |
|
||||
| describe | varchar(256) | | | 网站描述 |
|
||||
| icp | varchar(32) | | | ICP备案号 |
|
||||
| copyright | varchar(128) | | | 版权 |
|
||||
| uploaddir | varchar(32) | | uploads/ | 上传目录 |
|
||||
| staticdir | varchar(32) | | htmls | 静态化目录 |
|
||||
| browse_type | int(11) | | 1 | 浏览方式(1:动态2:静态) |
|
||||
| appid | varchar(128) | | | 畅言appid(已废弃) |
|
||||
| appkey | varchar(128) | | | 畅言appkey(已废弃) |
|
||||
|
||||
### 2. system_user(用户表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-----------------|-------------|----|---------------------|--------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| username | varchar(32) | | | 用户名 |
|
||||
| password | varchar(32) | | | 密码 |
|
||||
| mobile | varchar(32) | | | 手机 |
|
||||
| realname | varchar(32) | | | 真实姓名 |
|
||||
| status | int(11) | | | 状态(1:启用0:禁用) |
|
||||
| page_style | varchar(32) | | | 页面风格(已废弃) |
|
||||
| salt | varchar(64) | | uploads/ | 密码盐 |
|
||||
| last_login_ip | varchar(32) | | htmls | 上次登录IP |
|
||||
| last_login_time | varchar(32) | | 1 | 上次登录时间 |
|
||||
| portrait | varchar(32) | | | 头像 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 3. system_role(角色表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|-------------|----|---------------------|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| role_name | varchar(64) | | | 角色名称 |
|
||||
| role_code | varchar(8) | | | 角色编码 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 4. system_user_role(用户角色关联表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|---------|-------------|----|-----|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| user_id | varchar(32) | | | 用户ID |
|
||||
| role_id | varchar(32) | | | 角色ID |
|
||||
|
||||
### 5. system_menu(菜单表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|--------------|----|---------------------|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| menu_name | varchar(64) | | | 菜单名称 |
|
||||
| menu_code | varchar(32) | | | 菜单编码 |
|
||||
| menu_url | varchar(512) | | | 菜单路径 |
|
||||
| parent_id | varchar(32) | | | 上级菜单 |
|
||||
| menu_icon | varchar(64) | | | 菜单图标 |
|
||||
| sort | int(11) | | | 排序 |
|
||||
| remark | text | | | 备注 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 6. system_permission(权限表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-----------------|--------------|----|---------------------|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| permission_name | varchar(128) | | | 权限名称 |
|
||||
| permission_code | varchar(32) | | | 权限编码 |
|
||||
| menu_id | varchar(32) | | | 所属菜单 |
|
||||
| permission_url | varchar(512) | | | 权限路径 |
|
||||
| remark | text | | | 备注 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 7. system_role_permission(角色权限关联表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|---------------|-------------|----|-----|---------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| role_id | varchar(32) | | | 角色ID |
|
||||
| permission_id | varchar(32) | | | 权限ID |
|
||||
| type | int(11) | | | 类型(1:菜单;2:权限) |
|
||||
|
||||
### 8. system_scheduled(定时任务表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-----------------|--------------|----|---------------------|----------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| task_name | varchar(128) | | | 任务名称 |
|
||||
| clazz_name | varchar(512) | | | 完整类路径 |
|
||||
| cron_expression | varchar(128) | | | cron表达式 |
|
||||
| remark | text | | | 备注 |
|
||||
| status | varchar(32) | | | 状态(1:启用;0:禁用;) |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 9. system_category(栏目分类表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|----------------|--------------|----|---------------------|-------------------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| cnname | varchar(128) | | | 栏目中文名称 |
|
||||
| enname | varchar(64) | | | 栏目英文名称 |
|
||||
| code | varchar(32) | | | 编码 |
|
||||
| cat_seq | varchar(128) | | | 层级关系 |
|
||||
| form_id | varchar(32) | | | 表单ID |
|
||||
| image_path | varchar(128) | | | 栏目图片 |
|
||||
| description | varchar(128) | | | 栏目描述 |
|
||||
| link_target | varchar(8) | | | 链接目标 |
|
||||
| page_size | int(11) | | 20 | 分页数量 |
|
||||
| cat_model | int(11) | | 1 | 栏目模型(1:封面;2:列表;3:外部链接;) |
|
||||
| visit_url | varchar(128) | | | 访问路径 |
|
||||
| cover_temp | varchar(128) | | | 封面模版 |
|
||||
| list_temp | varchar(128) | | | 列表模版 |
|
||||
| article_temp | varchar(32) | | | 内容页模版 |
|
||||
| link_url | varchar(128) | | | 链接路径 |
|
||||
| default_editor | varchar(10) | | | 默认编辑器 |
|
||||
| md_content | text | | | md内容 |
|
||||
| html_content | text | | | html内容 |
|
||||
| parent_id | varchar(128) | | | 上级栏目 |
|
||||
| is_show | int(11) | | 1 | 公开选项(1:显示;0:隐藏;) |
|
||||
| level | varchar(10) | | | 栏目级别 |
|
||||
| sort | int(11) | | 50 | 排序 |
|
||||
| is_input | int(11) | | 0 | 是否允许投稿 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
| ext01 | varchar(32) | | | 扩展字段1 |
|
||||
| ext02 | varchar(32) | | | 扩展字段2 |
|
||||
| ext03 | varchar(32) | | | 扩展字段3 |
|
||||
| ext04 | varchar(32) | | | 扩展字段4 |
|
||||
| ext05 | varchar(32) | | | 扩展字段5 |
|
||||
|
||||
### 10. system_archives(栏目文章表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|--------------|---------------|----|---------------------|------------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| title | varchar(128) | | | 文章标题 |
|
||||
| properties | varchar(32) | | n | 自定义属性 |
|
||||
| image_path | varchar(128) | | | 缩略图 |
|
||||
| tag | varchar(128) | | | 标签 |
|
||||
| description | varchar(256) | | | 内容摘要 |
|
||||
| category_id | varchar(32) | | | 上级栏目 |
|
||||
| comment | int(11) | | 1 | 允许评论 |
|
||||
| subscribe | int(11) | | 1 | 允许订阅 |
|
||||
| clicks | int(11) | | 0 | 浏览量 |
|
||||
| weight | int(11) | | 0 | 权重 |
|
||||
| status | int(11) | | 1 | 状态(1:已发布;0:未发布;) |
|
||||
| category_ids | varchar(1024) | | | 栏目层级 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 11. system_labels(文章标签表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|--------------|----|---------------------|--------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| tag_name | varchar(128) | | | 标签名称 |
|
||||
| pinyin | varchar(256) | | | 拼音 |
|
||||
| first_char | varchar(2) | | | 首字母 |
|
||||
| tag_count | varchar(64) | | | 标签使用次数 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 12. system_attachment(附件表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|--------------|----|---------------------|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| code | varchar(32) | | | 标识码 |
|
||||
| filename | varchar(64) | | | 文件名 |
|
||||
| filesize | int(11) | | | 文件大小 |
|
||||
| filetype | varchar(128) | | | 文件类型 |
|
||||
| filepath | varchar(256) | | | 文件路径 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 13. system_forms(表单模型表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|--------------|----|---------------------|---------------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| form_name | varchar(32) | | | 表单名 |
|
||||
| table_name | varchar(128) | | | 表名 |
|
||||
| code | varchar(32) | | | 编码系统自动生成 |
|
||||
| type | int(11) | | 1 | 类型(0:系统模型;1:自定义模型;) |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
| ext01 | varchar(32) | | | 扩展字段1 |
|
||||
| ext02 | varchar(32) | | | 扩展字段2 |
|
||||
| ext03 | varchar(32) | | | 扩展字段3 |
|
||||
| ext04 | varchar(32) | | | 扩展字段4 |
|
||||
| ext05 | varchar(32) | | | 扩展字段5 |
|
||||
|
||||
### 14. system_fields(表单字段表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|---------------|--------------|----|---------------------|----------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| form_id | varchar(32) | | | |
|
||||
| field_text | varchar(32) | | | 字段提示名 |
|
||||
| field_name | varchar(128) | | | 字段名 |
|
||||
| type | int(11) | | 1 | 类型(暂无使用) |
|
||||
| data_type | varchar(32) | | | 数据类型 |
|
||||
| default_value | varchar(128) | | | 默认值 |
|
||||
| max_length | int(11) | | | 最大长度 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
| ext01 | varchar(32) | | | 扩展字段1 |
|
||||
| ext02 | varchar(32) | | | 扩展字段2 |
|
||||
| ext03 | varchar(32) | | | 扩展字段3 |
|
||||
| ext04 | varchar(32) | | | 扩展字段4 |
|
||||
| ext05 | varchar(32) | | | 扩展字段5 |
|
||||
|
||||
### 15. system_theme(网站主题表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|--------------|--------------|----|---------------------|---------------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| theme_name | varchar(128) | | | 风格名称 |
|
||||
| theme_author | varchar(32) | | | 作者 |
|
||||
| theme_img | varchar(128) | | | 缩略图 |
|
||||
| theme_path | varchar(128) | | | 目录名 |
|
||||
| status | int(11) | | 0 | 状态(1:启用;0:禁用) |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 16. system_variable(网站变量表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|---------------|----|---------------------|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| item_name | varchar(255)} | | | 变量名称 |
|
||||
| info | varchar(255)} | | | 描述 |
|
||||
| type | varchar(255)} | | | 字段类型 |
|
||||
| value | varchar(255)} | | | 变量值 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
|
||||
### 17. system_logger(系统日志表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|--------------|----|---------------------|-------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| level | varchar(32) | | | 级别 |
|
||||
| oper_user | varchar(64) | | | 操作用户 |
|
||||
| oper_type | varchar(32) | | | 操作类型 |
|
||||
| oper_source | varchar(128) | | | 操作源 |
|
||||
| ip | varchar(64) | | | IP |
|
||||
| module | varchar(64) | | | 模块 |
|
||||
| browser | varchar(128) | | | 浏览器 |
|
||||
| platform | varchar(128) | | | 平台 |
|
||||
| content | text | | | 内容 |
|
||||
| create_by | varchar(32) | | | 创建人 |
|
||||
| create_time | timestamp | | 2018-01-01 00:00:00 | 创建时间 |
|
||||
| update_by | varchar(32) | | | 修改人 |
|
||||
| update_time | timestamp | | CURRENT_TIMESTAMP | 修改时间 |
|
||||
| extend1 | varchar(256) | | | 扩展字段1 |
|
||||
| extend2 | varchar(256) | | | 扩展字段2 |
|
||||
| extend3 | varchar(256) | | | 扩展字段3 |
|
||||
|
||||
### 18. system_search(搜索记录表)
|
||||
|
||||
| 字段名 | 类型 | 键 | 默认值 | 字段说明 |
|
||||
|-------------|---------------|----|-------------------|------|
|
||||
| id | varchar(32) | 主键 | | 主键 |
|
||||
| keywords | varchar(128) | | | 关键字 |
|
||||
| create_time | timestamp | | CURRENT_TIMESTAMP | 创建时间 |
|
||||
|
||||
### 19. 其它表
|
||||
|
||||
> 剩余其它表,均为表单模型创建生成,可以后台表单模型模块中进行查看。
|
1291
docs/chapter07/DefineLabel.html
Normal file
1291
docs/chapter07/DefineLabel.html
Normal file
File diff suppressed because it is too large
Load Diff
39
docs/chapter07/DefineLabel.md
Normal file
39
docs/chapter07/DefineLabel.md
Normal file
@ -0,0 +1,39 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 定义标签
|
||||
在实际开发中,可能系统自带的标签满足不了复杂需求,这时需要用户来自定义标签,前面的介绍,我们已经知道标签有统一的接口,就是:
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.IParse
|
||||
```
|
||||
我们只需要实现该接口,重写两个parse方法即可,然后在统一入口中来调用就可以了。
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.ParseEngine
|
||||
```
|
||||
并且自定义标签类,还需要添加@Tag注解,如有属性还需要添加@Attribute注解,最后需要将该类纳入Spring管理,添加@Component注解
|
||||
|
||||
#### 范例
|
||||
```java?linenums
|
||||
@Component
|
||||
@Tag(beginTag="{dreamer-cms:custom}",endTag="{/dreamer-cms:custom}",regexp="\\{dreamer-cms:custom[ \\t]*.*\\}([\\s\\S]+?)\\{/dreamer-cms:custom\\}", attributes={
|
||||
@Attribute(name = "attr1",regex = "[ \t]+attr1=\".*?\""),
|
||||
})
|
||||
public class CustomTag implements IParse {
|
||||
|
||||
@Override
|
||||
public String parse(String html) {
|
||||
// 解析代码
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parse(String html, String params) {
|
||||
// 解析代码
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
1321
docs/chapter07/Message.html
Normal file
1321
docs/chapter07/Message.html
Normal file
File diff suppressed because it is too large
Load Diff
78
docs/chapter07/Message.md
Normal file
78
docs/chapter07/Message.md
Normal file
@ -0,0 +1,78 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 留言投稿
|
||||
在网站开发时,难免会有留言投稿的需求,Dreamer CMS考虑到这点,为大家提供了留言投稿的功能。以下内容详细介绍在自定义模板中,如何使用留言投稿的功能。
|
||||
|
||||
模板文件:
|
||||
```
|
||||
新版:default_v2/list_case.html
|
||||
旧版:default/list_message.html
|
||||
```
|
||||
|
||||
#### 前端表单
|
||||
在使用留言投稿功能时,为了防止恶意留言,我们必须要使用图形验证码功能进行校验。
|
||||
1. 网站后台
|
||||
```javascript?linenums
|
||||
在网站后台栏目管理中,要针对留言的栏目,必须要开启允许投稿。
|
||||
```
|
||||

|
||||
|
||||
2. 验证码地址
|
||||
```javascript?linenums
|
||||
var captchaURL = "/getKaptcha?t=" + new Date().getTime();
|
||||
// 建议每次切换都加上时间戳作为参数,避免缓存
|
||||
```
|
||||
3. 表单定义
|
||||
```html?linenums
|
||||
<form action="/input" method="post">
|
||||
<input type="hidden" name="typeid" value="wqz18j7q" />
|
||||
<input type="hidden" name="formkey" value="8t2lkr8d" />
|
||||
<div class="item">
|
||||
<input type="text" id="title" placeholder="填写您的姓名" name="title">
|
||||
</div>
|
||||
<div class="item">
|
||||
<input type="text" id="telephone" placeholder="填写您的联系电话" name="telephone">
|
||||
</div>
|
||||
<div class="item">
|
||||
<textarea id="content" name="content" class="form-control" placeholder="填写您的需求"></textarea>
|
||||
</div>
|
||||
<div class="captcha">
|
||||
<div class="login-form-vcode"><img alt="图片验证码" width="120" height="46" src="" id="vcode"></div>
|
||||
<div class="login-form-vcode-input"><input type="text" name="captcha" placeholder="验证码" required="required" class="form-control" /></div>
|
||||
<div class="clearFix"></div>
|
||||
</div>
|
||||
<div class="form-btn-group-left">
|
||||
<div class="submission set_5_button" id="essentialInformation">提交</div>
|
||||
</div>
|
||||
</form>
|
||||
```
|
||||
|
||||
注意:
|
||||
1. 提交地址必须为/input,方式必须为POST。
|
||||
2. captcha: 验证码字段名,不可改变。
|
||||
3. typeid:使用隐藏域来定义该留言提交后,要提交到后台的哪一个栏目中,不可改变。
|
||||
4. formkey:该栏目所使用的表单模型,指定后可使用表单模型中定义的字段名,不可改变。
|
||||
5. title:公共字段,文章标题,不可改变。
|
||||
6. telephone|content:表单模型中定义的字段。
|
||||
|
||||
#### 后端接收
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.controller.FrontController
|
||||
```
|
||||
在该类中的input方法,为后端接收前台留言的控制器。返回JSON数据,格式如下:
|
||||
```javascript?linenums
|
||||
{
|
||||
"success": true,
|
||||
"state": "200",
|
||||
"data": null,
|
||||
"info": "操作成功"
|
||||
}
|
||||
// 前台只需要判断response.state === "200"即可,其它结果均为失败。
|
||||
```
|
||||
|
||||
#### 范例
|
||||

|
1267
docs/chapter07/Regexp.html
Normal file
1267
docs/chapter07/Regexp.html
Normal file
File diff suppressed because it is too large
Load Diff
20
docs/chapter07/Regexp.md
Normal file
20
docs/chapter07/Regexp.md
Normal file
@ -0,0 +1,20 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 正则工具类
|
||||
在扩展标签时,需要对html模版进行正则解析,具体可使用系统中的正则工具类
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.taglib.utils.RegexUtil
|
||||
```
|
||||
该类提供了正则匹配相关的一系列静态方法。
|
||||
|
||||
#### 范例
|
||||
```java?linenums
|
||||
//获取html中的标签
|
||||
List<String> tags = RegexUtil.parseAll(html, channelAnnotation.regexp(), 0);
|
||||
//获取html中的标签中的内容
|
||||
List<String> contents = RegexUtil.parseAll(html, channelAnnotation.regexp(), 1);
|
||||
```
|
1285
docs/chapter07/Search.html
Normal file
1285
docs/chapter07/Search.html
Normal file
File diff suppressed because it is too large
Load Diff
34
docs/chapter07/Search.md
Normal file
34
docs/chapter07/Search.md
Normal file
@ -0,0 +1,34 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 网站搜索
|
||||
在本小节,将带领大家一起学习网站中搜索功能的实现。
|
||||
|
||||
模板文件必须为search.html,在模板文件中,可以使用pagelist标签展示数据和pagination标签来进行分页。
|
||||
|
||||
#### 前端表单
|
||||
```html?linenums
|
||||
<form class="navbar-left nav-search" role="search" action="/search" method="post">
|
||||
<input class="form-control" placeholder="输入关键字进行搜索..." type="text" name="entity['keywords']">
|
||||
<input type="submit" value="搜索" />
|
||||
</form>
|
||||
```
|
||||
注意:
|
||||
1. 提交地址必须为/search,方式必须为POST。
|
||||
2. keywords: 搜索关键词,不可改变。
|
||||
3. typeid:栏目编码,可以多个,多个使用英文逗号分隔(搜索范围:该字段可有可无,无默认为全站搜索)。
|
||||
4. 字段都要包在entity对象中,如entity['typeid']
|
||||
|
||||
#### 后端接收
|
||||
```java?linenums
|
||||
cc.iteachyou.cms.controller.FrontController
|
||||
```
|
||||
在该类中的search方法,为后端接收前台留言的控制器。返回HTML模板。
|
||||
|
||||
#### 范例
|
||||
```java?linenums
|
||||
无
|
||||
```
|
1289
docs/chapter08/Environment.html
Normal file
1289
docs/chapter08/Environment.html
Normal file
File diff suppressed because it is too large
Load Diff
49
docs/chapter08/Environment.md
Normal file
49
docs/chapter08/Environment.md
Normal file
@ -0,0 +1,49 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 环境准备
|
||||
|
||||
1. Redis
|
||||
2. Jdk1.8
|
||||
3. Mysql5.7(忽略大小写)
|
||||
4. Nginx
|
||||
|
||||
### 软件安装
|
||||
|
||||
#### 1. Redis安装
|
||||
[Windows安装及配置方法](https://iteachyou.cc/article/4b0a638f65fa4fb1b9644cf461dba602)
|
||||
|
||||
[Linux安装及配置方法](https://iteachyou.cc/article/1676407365014867968)
|
||||
|
||||
#### 2. Jdk1.8安装
|
||||
##### 2.1 下载Jdk
|
||||
|
||||
[下载Jdk1.8](https://www.oracle.com/java/technologies/downloads/#java8)
|
||||
|
||||
Linux下载:jdk-8u371-linux-x64.tar.gz
|
||||
##### 2.2 安装Jdk
|
||||
将下载的jdk-8u371-linux-x64.tar.gz进行解压,解压到/usr/local/Java/目录中,最终目录为:/usr/local/Java/jdk1.8.0_361
|
||||
##### 2.3 配置环境变量
|
||||
编辑/etc/profile文件,添加如下内容
|
||||
```shell
|
||||
# Java
|
||||
export JAVA_HOME=/usr/local/Java/jdk1.8.0_361
|
||||
export JRE_HOME=/usr/local/Java/jdk1.8.0_361/jre
|
||||
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
|
||||
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
|
||||
```
|
||||
使环境变量生效
|
||||
```shell
|
||||
source /etc/profile
|
||||
```
|
||||
|
||||
#### 3. 安装Mysql5.7
|
||||
[Windows安装及配置方法](https://iteachyou.cc/article/a1db138b4a89402ab50f3499edeb30c2)
|
||||
|
||||
[Linux安装及配置方法](https://iteachyou.cc/article/d78be30aef8e49c6b16fb92af2eb2dd3)
|
||||
|
||||
#### 4. 安装Nginx
|
||||
Windows下安装Nginx只需要解压即可,在这里只讲Linux中的安装方法 [Linux安装及配置方法](https://iteachyou.cc/article/1664185302896316416)
|
1360
docs/chapter08/Online.html
Normal file
1360
docs/chapter08/Online.html
Normal file
File diff suppressed because it is too large
Load Diff
108
docs/chapter08/Online.md
Normal file
108
docs/chapter08/Online.md
Normal file
@ -0,0 +1,108 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 应用打包
|
||||
1. 启动应用
|
||||
```shell
|
||||
cd /opt/programs/
|
||||
# 普通打包,以下命令根据自己实际情况来选择
|
||||
nohup java -jar dreamer-cms.jar > dreamer-cms.log &
|
||||
# 将jar包单独打到目录中
|
||||
# nohup java -Dloader.path=libs/ -jar dreamer-cms.jar > dreamer-cms.log &
|
||||
```
|
||||
|
||||
2. 配置Nginx
|
||||
1. 普通方式(Http)
|
||||
```shell
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.iteachyou.cc iteachyou.cc;
|
||||
|
||||
location / {
|
||||
add_header X-Via $upstream_addr;
|
||||
proxy_ignore_client_abort on;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://127.0.0.1:8888;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
```
|
||||
2. SSL方式(Https)
|
||||
```shell
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.iteachyou.cc iteachyou.cc;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
rewrite ^(.*)$ https://$host$1 permanent; # 强制http进入https
|
||||
|
||||
error_page 403 404 /update.html;
|
||||
location = /update.html {
|
||||
root html;
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
server {
|
||||
#SSL 访问端口号为 443
|
||||
listen 443 ssl;
|
||||
#填写绑定证书的域名
|
||||
server_name www.iteachyou.cc iteachyou.cc;
|
||||
#证书文件名称(修改为自己的路径)
|
||||
ssl_certificate /opt/ssl/iteachyou.cc/1_iteachyou.cc_bundle.crt;
|
||||
#私钥文件名称(修改为自己的路径)
|
||||
ssl_certificate_key /opt/ssl/iteachyou.cc/2_iteachyou.cc.key;
|
||||
ssl_session_timeout 5m;
|
||||
#请按照这个协议配置
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
#请按照这个套件配置,配置加密套件,写法遵循 openssl 标准。
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
||||
ssl_prefer_server_ciphers on;
|
||||
location / {
|
||||
add_header X-Via $upstream_addr;
|
||||
proxy_ignore_client_abort on;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Cookie $http_cookie;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://127.0.0.1:8888;
|
||||
proxy_redirect ~^http://([^:]+)(:\d+)?(.*)$ https://$1$3;
|
||||
}
|
||||
}
|
||||
```
|
||||
3. 配置Websocket,在nginx.conf中http模块中
|
||||
```shell
|
||||
#websocket
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
```
|
||||
4. 配置Gzip压缩,在nginx.conf中http模块中
|
||||
```shell
|
||||
# 开启gzip
|
||||
gzip on;
|
||||
# 启用gzip压缩的最小文件;小于设置值的文件将不会被压缩
|
||||
gzip_min_length 1k;
|
||||
# gzip 压缩级别 1-10
|
||||
gzip_comp_level 4;
|
||||
# 进行压缩的文件类型。
|
||||
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
||||
# 是否在http header中添加Vary: Accept-Encoding,建议开启
|
||||
gzip_vary on;
|
||||
```
|
||||
|
||||
3. 上线后配置
|
||||
项目通过以上步骤,则可以正常通过域名或IP访问后台,但是后台中还需要配置一些网址。网站配置=>网站地址需要修改为正式的域名或IP地址,如:https://www.iteachyou.cc/ 或 http://192.168.1.10:8888/
|
1299
docs/chapter08/Packaging.html
Normal file
1299
docs/chapter08/Packaging.html
Normal file
File diff suppressed because it is too large
Load Diff
36
docs/chapter08/Packaging.md
Normal file
36
docs/chapter08/Packaging.md
Normal file
@ -0,0 +1,36 @@
|
||||
<div style="display: flex;">
|
||||
<img src="http://121.8.219.2:18887/logo.png" height="30" />
|
||||
<div style="margin-left: 5px; font-size: 30px; line-height: 30px; font-weight: bold;">梦想家内容管理系统</div>
|
||||
</div>
|
||||
|
||||
----------
|
||||
### 应用打包
|
||||
1. 在IDE中将项目中的配置文件都修改好,然后执行maven打包命令,打包前强烈建议先clean。打包前切换SpringBoot环境为prd,并对application-prd.yml中的各配置项进行配置。
|
||||
|
||||
2. 以下为可选配置
|
||||
1. 将依赖jar包单独打到目录中,请参照 [Springboot打包 依赖包到单独文件夹](https://iteachyou.cc/article/a3ef3eb4ce5d467b927ecd5c69a43035)
|
||||
|
||||
3. 开启防火墙和安全组
|
||||
1. 防火墙需要开启80和443端口
|
||||
2. 云服务器需要在管理界面中安全组中开启80和443端口
|
||||
|
||||
4. 上传应用和资源目录
|
||||
1. 在/opt目录中创建programs和resources两个目录
|
||||
```shell
|
||||
/opt
|
||||
/programs # 应用上传到该目录
|
||||
/resources # 资源目录上传到该目录
|
||||
```
|
||||
2. 最终的目录结构
|
||||
```shell
|
||||
/opt
|
||||
/programs # 应用上传到该目录
|
||||
/dreamer-cms.jar
|
||||
/resources # 资源目录上传到该目录
|
||||
/www.iteachyou.cc
|
||||
/backups # 备份目录
|
||||
/config.json # 富文本配置文件
|
||||
/htmls # 静态化目录
|
||||
/templates # 模板目录
|
||||
/uploads # 上传目录
|
||||
```
|
1272
docs/chapter09/Business.html
Normal file
1272
docs/chapter09/Business.html
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user