Skip to content

Commit d4377bb

Browse files
committed
v10.1.3
1 parent 968cc79 commit d4377bb

File tree

10 files changed

+49
-33
lines changed

10 files changed

+49
-33
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# UJCMS 发版说明
22

3+
## ujcms-10.1.3
4+
5+
* refactor: 栏目页的子栏目列表不显示非导航栏目
6+
* fix: 将 SeqMapper.xml 文件中的 'IsNotNull' 改为 'IS NOT NULL'
7+
* fix: 默认关闭 ES 和 Redis 的自动配置(autoconfig)
8+
39
## ujcms-10.1.2
410

511
* fix: 修复默认 admin 密码错误问题

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2021-2024 南昌蓝智科技有限公司
189+
Copyright 2021-present 南昌蓝智科技有限公司
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ UJCMS 是一款基于 Java 的开源企业级网站内容管理系统(Java CMS
6262

6363
后台地址:[http://127.0.0.1:8080/cp/](http://127.0.0.1:8080/cp/),用户名:admin,密码:password。后台前端基于 Vue 开发,如要修改后台界面,请另外下载 `ujcms-cp` 项目。
6464

65-
默认访问地址是 `http://127.0.0.1:8080/` ,如需修改域名、端口等内容,可分别到后台 `配置 - 系统设置``配置 - 站点设置` 中修改。修改域名、端口等信息后,需要在 `内容 - 生成管理` 处,点击 `更新全部索引`,以免 `全文检索``相关文章` 的 url 地址依然为原域名、端口地址。
65+
默认访问地址是 `http://127.0.0.1:8080/` ,如需修改域名、端口等内容,可分别到后台 `配置 - 全局设置``配置 - 站点设置` 中修改。修改域名、端口等信息后,需要在 `内容 - 生成管理` 处,点击 `更新全部索引`,以免 `全文检索``相关文章` 的 url 地址依然为原域名、端口地址。
6666

6767
## 前台模板
6868

pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
<groupId>com.ujcms</groupId>
88
<artifactId>ujcms</artifactId>
9-
<version>10.1.2</version>
9+
<version>10.1.3</version>
1010
<packaging>${project.packaging}</packaging>
1111

1212
<name>UJCMS</name>
1313
<description>
1414
UJCMS 是基于 Java 的 CMS 网站内容系统。使用 SpringBoot、MyBatis、Vite、Vue3、ElementPlus、TailwindCSS 等技术开发。
1515
</description>
1616
<url>https://www.ujcms.com</url>
17-
<inceptionYear>2021-2025</inceptionYear>
17+
<inceptionYear>2021-present</inceptionYear>
1818

1919
<parent>
2020
<groupId>org.springframework.boot</groupId>
@@ -129,6 +129,12 @@
129129
<java.version>17</java.version>
130130
</properties>
131131
<dependencies>
132+
133+
<dependency>
134+
<groupId>org.springframework.boot</groupId>
135+
<artifactId>spring-boot-starter-actuator</artifactId>
136+
</dependency>
137+
132138
<dependency>
133139
<groupId>org.springframework.boot</groupId>
134140
<artifactId>spring-boot-starter-web</artifactId>

src/main/java/com/ujcms/cms/core/CacheConfig.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,31 @@ public CacheManagerCustomizer<CaffeineCacheManager> caffeineCacheManagerCustomiz
3434
// 内容统计缓存
3535
cacheManager.registerCustomCache(ContentStatCache.CACHE_NAME, Caffeine.newBuilder()
3636
.expireAfterWrite(ContentStatCache.EXPIRES_MINUTE, TimeUnit.MINUTES)
37-
.maximumSize(ContentStatCache.MAXIMUM_SIZE).build());
37+
.maximumSize(ContentStatCache.MAXIMUM_SIZE).recordStats().build());
3838
// 验证码尝试次数缓存
3939
cacheManager.registerCustomCache(CaptchaCache.CACHE_NAME, Caffeine.newBuilder()
4040
.expireAfterWrite(captchaProps.getExpires(), TimeUnit.MINUTES)
41-
.maximumSize(captchaProps.getMaximumSize()).build());
41+
.maximumSize(captchaProps.getMaximumSize()).recordStats().build());
4242
// IP登录尝试次数缓存
4343
cacheManager.registerCustomCache(IpLoginCache.CACHE_NAME, Caffeine.newBuilder()
4444
.expireAfterWrite(IpLoginCache.EXPIRES, TimeUnit.MINUTES)
45-
.maximumSize(IpLoginCache.MAXIMUM_SIZE).build());
45+
.maximumSize(IpLoginCache.MAXIMUM_SIZE).recordStats().build());
4646
// IP短信发送次数缓存
4747
cacheManager.registerCustomCache(IpSmsCache.CACHE_NAME, Caffeine.newBuilder()
4848
.expireAfterWrite(IpSmsCache.EXPIRES, TimeUnit.MINUTES)
49-
.maximumSize(IpSmsCache.MAXIMUM_SIZE).build());
49+
.maximumSize(IpSmsCache.MAXIMUM_SIZE).recordStats().build());
5050
// MyBatis二级缓存:GlobalSpringCache
5151
cacheManager.registerCustomCache(GlobalSpringCache.CACHE_NAME, Caffeine.newBuilder()
5252
.expireAfterWrite(GlobalSpringCache.EXPIRES, TimeUnit.MINUTES)
53-
.maximumSize(GlobalSpringCache.MAXIMUM_SIZE).build());
53+
.maximumSize(GlobalSpringCache.MAXIMUM_SIZE).recordStats().build());
5454
// MyBatis二级缓存:ConfigSpringCache
5555
cacheManager.registerCustomCache(SiteSpringCache.CACHE_NAME, Caffeine.newBuilder()
5656
.expireAfterWrite(SiteSpringCache.EXPIRES, TimeUnit.MINUTES)
57-
.maximumSize(SiteSpringCache.MAXIMUM_SIZE).build());
57+
.maximumSize(SiteSpringCache.MAXIMUM_SIZE).recordStats().build());
5858
// MyBatis二级缓存:GroupSpringCache
5959
cacheManager.registerCustomCache(GroupSpringCache.CACHE_NAME, Caffeine.newBuilder()
6060
.expireAfterWrite(GroupSpringCache.EXPIRES, TimeUnit.MINUTES)
61-
.maximumSize(GroupSpringCache.MAXIMUM_SIZE).build());
61+
.maximumSize(GroupSpringCache.MAXIMUM_SIZE).recordStats().build());
6262
};
6363
}
6464

src/main/java/com/ujcms/commons/captcha/GmailCaptchaEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
public class GmailCaptchaEngine extends com.octo.captcha.engine.image.ImageCaptchaEngine {
3636
@SuppressWarnings("unchecked")
37-
public GmailCaptchaEngine(WordGenerator wordGenerator, FontGenerator fontGenerator, ColorGenerator colorGenerator,
37+
public GmailCaptchaEngine(WordGenerator wordGenerator, FontGenerator fontGenerator, ColorGenerator colorGenerator,
3838
BackgroundGenerator background, int minWordLength, int maxWordLength, float radius) {
3939
TextPaster randomPaster = new GlyphsPaster(minWordLength, maxWordLength, colorGenerator,
4040
new GlyphsVisitors[]{

src/main/resources/application.yaml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# 例如:`spring.datasource.username:root`是非法配置,`spring.datasource.username: root`才是合法配置。
33

44
# 数据库连接 URL
5-
# `localhost`是数据库的IP地址,数据库安装在本机可直接用`localhost`或`127.0.0.1`,如安装在其它服务器,则填写IP,如`192.168.0.1`。
6-
# `3306`是数据库端口号,MySQL默认端口号就是`3306`,如安装数据库时,没有手动修改过端口号,则无需修改。
7-
# `ujcms`是数据库名,即创建数据库时,所填的数据库名。
8-
# `serverTimezone=Asia/Shanghai`是时区,中国使用上海时区也就是北京时间,不用改动。
9-
# `characterEncoding=UTF-8`是连接数据库的编码。不要改动。即使数据使用的是`utf8mb4`编码,此处依然使用`UTF-8`。
10-
spring.datasource.url: jdbc:mysql://localhost:3306/ujcms?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
5+
# `127.0.0.1` 是数据库的IP地址,数据库安装在本机可直接用 `127.0.0.1`,如安装在其它服务器,则填写相应 IP,如 `192.168.0.1`。
6+
# `3306` 是数据库端口号,MySQL默认端口号就是 `3306`,如安装数据库时,没有手动修改过端口号,则无需修改。
7+
# `ujcms` 是数据库名,即创建数据库时,所填的数据库名。
8+
# `serverTimezone=Asia/Shanghai` 是时区,中国使用上海时区也就是北京时间,不用改动。
9+
# `characterEncoding=UTF-8` 是连接数据库的编码。不要改动。即使数据使用的是`utf8mb4`编码,此处依然使用`UTF-8`。
10+
spring.datasource.url: jdbc:mysql://127.0.0.1:3306/ujcms?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
1111
# 数据库用户名(注意:所有配置名的冒号后必须保留一个英文空格)
1212
spring.datasource.username: root
1313
# 数据库密码(注意:所有配置名的冒号后必须保留一个英文空格)
@@ -23,7 +23,7 @@ ujcms.database-bin-path:
2323

2424

2525
# MariaDB 数据库
26-
#spring.datasource.url: jdbc:mariadb://localhost:3306/ujcms?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
26+
#spring.datasource.url: jdbc:mariadb://127.0.0.1:3306/ujcms?serverTimezone=Asia/Shanghai&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
2727
#spring.datasource.username: root
2828
#spring.datasource.password: password
2929
#spring.datasource.driver-class-name: org.mariadb.jdbc.Driver
@@ -32,7 +32,7 @@ ujcms.database-bin-path:
3232
#ujcms.database-bin-path:
3333

3434
# PostgreSQL数据库
35-
#spring.datasource.url: jdbc:postgresql://localhost:5432/ujcms
35+
#spring.datasource.url: jdbc:postgresql://127.0.0.1:5432/ujcms
3636
#spring.datasource.username: postgres
3737
#spring.datasource.password: password
3838
#spring.datasource.driver-class-name: org.postgresql.Driver
@@ -42,7 +42,7 @@ ujcms.database-bin-path:
4242

4343
# 人大金仓数据库(使用 PostgreSQL 驱动,官方推荐方式。不能使用 kingbase8 驱动)
4444
# 安装参数选项:数据库兼容模式(PG),字符集编码(UTF8),大小写敏感(YES)
45-
#spring.datasource.url: jdbc:postgresql://localhost:54321/ujcms
45+
#spring.datasource.url: jdbc:postgresql://127.0.0.1:54321/ujcms
4646
#spring.datasource.username: postgres
4747
#spring.datasource.password: password
4848
#spring.datasource.driver-class-name: org.postgresql.Driver
@@ -53,7 +53,7 @@ ujcms.database-bin-path:
5353
# openGauss高斯数据库(使用仿 PostgreSQL 版驱动 org.opengauss:opengauss-jdbc:5.0.0,并删除 PostgreSQL 驱动)
5454
# 直接使用 PostgreSQL 驱动,会报 Invalid or unsupported by client SCRAM mechanisms 错误
5555
# 数据库的 owner 必须与连接的用户一致。一般情况下应该避免使用数据库自带的用户和库,可新建一个用户、一个库,并将该库的 owner 设置为这个用户
56-
#spring.datasource.url: jdbc:postgresql://localhost:5432/ujcms
56+
#spring.datasource.url: jdbc:postgresql://127.0.0.1:5432/ujcms
5757
#spring.datasource.username: gaussdb
5858
#spring.datasource.password: openGauss@123
5959
#spring.datasource.driver-class-name: org.postgresql.Driver
@@ -64,7 +64,7 @@ ujcms.database-bin-path:
6464
# vastbase海量数据库(使用仿 PostgreSQL 版驱动 cn.com.vastdata:vastbase-jdbc:2.9p,并删除 PostgreSQL 驱动)
6565
# 也可直接使用 openGauss 驱动 org.opengauss:opengauss-jdbc:5.0.0
6666
# 应先创建用户并赋予所有权限(或赋予必须的权限,如创建表权限等),再以该用户作为 owner 创建数据库
67-
#spring.datasource.url: jdbc:postgresql://localhost:5432/ujcms
67+
#spring.datasource.url: jdbc:postgresql://127.0.0.1:5432/ujcms
6868
#spring.datasource.username: gaussdb
6969
#spring.datasource.password: openGauss@123
7070
#spring.datasource.driver-class-name: org.postgresql.Driver
@@ -73,7 +73,7 @@ ujcms.database-bin-path:
7373
#ujcms.database-bin-path:
7474

7575
# 瀚高数据库(不能使用 PostgreSQL 原版驱动)
76-
#spring.datasource.url: jdbc:highgo://localhost:5866/highgo
76+
#spring.datasource.url: jdbc:highgo://127.0.0.1:5866/highgo
7777
#spring.datasource.username: highgo
7878
#spring.datasource.password: Highgo@123
7979
#spring.datasource.driver-class-name: com.highgo.jdbc.Driver
@@ -82,7 +82,7 @@ ujcms.database-bin-path:
8282
#ujcms.database-bin-path:
8383

8484
# 达梦数据库(不可直接创建模式;应该创建用户,达梦会自动创建同名模式;用户要赋予 RESOURCE 角色;使用新建的用户连接数据库)
85-
#spring.datasource.url: jdbc:dm://localhost:5236/UJCMS
85+
#spring.datasource.url: jdbc:dm://127.0.0.1:5236/UJCMS
8686
## 达梦的用户名需与 spring.datasource.url 中的数据库名一致
8787
#spring.datasource.username: UJCMS
8888
#spring.datasource.password: Pass@0000
@@ -214,6 +214,10 @@ spring.jackson.mapper.DEFAULT_VIEW_INCLUSION: true
214214
spring.data.elasticsearch.repositories.enabled: false
215215
# 缓存类型。默认为内存缓存,集群环境需要设置为 redis
216216
spring.cache.type: caffeine
217+
# 禁用 Redis 和 Elasticsearch 自动配置(使用 caffeine 缓存且不使用 ES 时)
218+
spring.autoconfigure.exclude:
219+
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
220+
- org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration
217221
# 如果多个应用共享一个redis,需要设置该值,以免冲突。默认:0
218222
#spring.redis.database: 0
219223

src/main/resources/com/ujcms/cms/core/mapper/SeqMapper.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
#{item}
124124
</foreach>
125125
</when>
126-
<when test="condition.operator != 'IS NULL' and condition.operator != 'IsNotNull'">#{condition.value}</when>
126+
<when test="condition.operator != 'IS NULL' and condition.operator != 'IS NOT NULL'">#{condition.value}</when>
127127
</choose>
128128
</sql>
129129
<sql id="selectWhereJsonCondition">
@@ -183,7 +183,7 @@
183183
#{item}
184184
</foreach>
185185
</when>
186-
<when test="condition.operator != 'IS NULL' and condition.operator != 'IsNotNull'">
186+
<when test="condition.operator != 'IS NULL' and condition.operator != 'IS NOT NULL'">
187187
#{condition.value}
188188
</when>
189189
</choose>
@@ -232,7 +232,7 @@
232232
#{item}
233233
</foreach>
234234
</when>
235-
<when test="condition.operator != 'IS NULL' and condition.operator != 'IsNotNull'">
235+
<when test="condition.operator != 'IS NULL' and condition.operator != 'IS NOT NULL'">
236236
#{condition.value}
237237
</when>
238238
</choose>
@@ -284,7 +284,7 @@
284284
#{item}
285285
</foreach>
286286
</when>
287-
<when test="condition.operator != 'IS NULL' and condition.operator != 'IsNotNull'">
287+
<when test="condition.operator != 'IS NULL' and condition.operator != 'IS NOT NULL'">
288288
#{condition.value}
289289
</when>
290290
</choose>
@@ -326,7 +326,7 @@
326326
#{item}
327327
</foreach>
328328
</when>
329-
<when test="condition.operator != 'IS NULL' and condition.operator != 'IsNotNull'">
329+
<when test="condition.operator != 'IS NULL' and condition.operator != 'IS NOT NULL'">
330330
#{condition.value}
331331
</when>
332332
</choose>

0 commit comments

Comments
 (0)