Skip to content

Config & Notice

System configuration and notice (announcement) management modules for storing application settings and broadcasting messages to users.

System Configuration

Features

  • Key-value configuration stored in database
  • CRUD operations with pagination and search
  • Configurations can be cached to Redis for fast access
  • Used for runtime-tunable application settings

Data Model — SysConfig (sys_config)

FieldTypeDescription
configIdLongPrimary key
configNameStringDisplay name
configKeyStringUnique config key
configValueStringConfig value
configTypeIntegerBuilt-in or custom
remarkStringNotes
createTimeDateTimeCreation timestamp
updateTimeDateTimeLast update timestamp

API Endpoints

MethodEndpointDescription
POST/admin-api/configList configs (paginated)
POST/admin-api/config/createCreate config entry
PUT/admin-api/config/updateUpdate config entry
POST/admin-api/config/deleteDelete config(s)

Usage Example

Store a system-wide setting like the default pagination size:

Config KeyConfig ValueDescription
sys.default.pageSize20Default page size
sys.account.registerEnabledfalseAllow self-registration
sys.captcha.typemathCaptcha type

Service Layer

SysConfigService provides:

  • findByConfigKey(String key) — look up a config value by key
  • Standard CRUD via Spring Data JPA SysConfigRepository

Notice Management

Features

  • Create and manage system notices / announcements
  • Support for different notice types (notification, announcement)
  • Status management (draft, published)
  • List with pagination and search

Data Model — SysNotice (sys_notice)

FieldTypeDescription
noticeIdLongPrimary key
noticeTitleStringNotice title
noticeTypeIntegerType (1: notification, 2: announcement)
noticeContentStringContent (supports rich text)
statusIntegerStatus (0: draft, 1: published)
createByStringCreator
remarkStringNotes
createTimeDateTimeCreation timestamp
updateTimeDateTimeLast update timestamp

API Endpoints

MethodEndpointDescription
POST/admin-api/noticeList notices (paginated)
POST/admin-api/notice/createCreate notice
PUT/admin-api/notice/updateUpdate notice
POST/admin-api/notice/deleteDelete notice(s)

Notice Types

TypeValueDescription
Notification1Internal team notifications
Announcement2System-wide announcements

Released under the MIT License.