Notes
Notes - notes.io |
Setup & Deployment Guide
Parent Page: Drive Framework Standard Functions - Overview
Purpose: How to set up, configure, and deploy standard functions locally
Table of Contents
Prerequisites
Frontend Project Setup
Backend Project Setup
Configuration-Driven Development
Code Generation
Adding New Standard Functions
Deployment & Update
1. Prerequisites
Development Environment
Node.js ≥ 16.x Frontend development
npm / yarn Latest Package management
JDK 17+ Backend (Spring Boot 3)
Maven 3.8+ Backend build tool
Git Latest Source control
IDE VS Code / IntelliJ IDEA Development
Database PostgreSQL or SQL Server Data storage
Accounts & Access
Mercedes-Benz GHE account (access to GitHub Enterprise repositories)
DNA CodeSpaces access (for deployment)
Artifactory access (for Maven dependencies)
MinIO credentials (for file upload/download)
2. Frontend Project Setup
Repository: FC-CDT-StdFunction-FrontEnd
Latest Branch: dev
2.1 Clone Repository
git clone https://mercedes-benz.ghe.com/DNA-CodeSpaces/FC-CDT-StdFunction-FrontEnd.git
cd FC-CDT-StdFunction-FrontEnd
git checkout dev
2.2 Install Dependencies
npm install
# or
yarn install
2.3 Configure Environment
Create/update .env or environment configuration file:
REACT_APP_API_BASE_URL=http://localhost:{port}/{context-path}
REACT_APP_SSO_ENABLED=false # disable SSO for local dev
2.4 Start Development Server
npm start
# or
yarn start
2.5 Frontend Directory Structure
src/pages/StdFunc/
├── components/ # Shared Components
│ ├── Actions/ # Action Components (Add, Edit, Delete, Export)
│ ├── Config/ # Configuration Components
│ ├── DataMapping/ # Data Mapping Components
│ ├── FlatSpreadTable/# Flat Table Components
│ └── ...
├── Config/ # Master Data Configuration Module
├── Hierarchy/ # Hierarchy Management Module
│ ├── api/ # API Services
│ ├── hooks/ # Custom Hooks
│ └── components/ # Sub-components
├── HierarchyComparison/# Hierarchy Comparison Module
├── Marco/ # Model Management Module
├── MasterData/ # Master Data Management Module
├── Reports/ # Report Management Module
│ ├── CreateReport/ # Create Report
│ ├── NewReportDetail/# New Report Detail
│ ├── components/ # Sub-components
│ └── hooks/ # Custom Hooks
├── Spread/ # Data Table Module
│ ├── Details/ # Detail Components
│ └── hooks/ # Custom Hooks
└── UploadCenter/ # Upload Center Module
2.6 Key Shared Components
PageView Page view container
TableView Table view component
Button Standardized button component
SvgIcon SVG icon component
UploadDialog File upload dialog
ZoomButton Fullscreen/zoom button
3. Backend Project Setup
Repository: Standard-Backend
Latest Branch: api-springboot3-1.2.7
3.1 Scaffolding a New Project
Option A: New project from DnA template
git clone https://mercedes-benz.ghe.com/DNA-CodeSpaces/drive-plus-template.git
cd drive-plus-template
git remote add project <your-project-repository-url>
git push project main:main --force
Option B: Add to existing project
Add Maven dependency:
<dependency>
<groupId>com.benz.generator</groupId>
<artifactId>code-generator-boot3-starter</artifactId>
<version>1.2.6-dev-SNAPSHOT</version>
</dependency>
3.2 Maven Repository Configuration
Add to your pom.xml:
<repositories>
<repository>
<id>central</id>
<name>central</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
<repository>
<id>releases</id>
<name>artifacts.i.mercedes-benz.com-releases</name>
<url>https://artifacts.i.mercedes-benz.com/artifactory/fmas-main-maven-releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
<id>snapshots</id>
<name>artifacts.i.mercedes-benz.com-snapshots</name>
<url>https://artifacts.i.mercedes-benz.com/artifactory/fmas-main-maven-snapshots</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</repository>
</repositories>
Add to your Maven settings.xml:
<servers>
<server>
<id>snapshots</id>
<username>${your_username}</username>
<password>${your_password}</password>
</server>
<server>
<id>releases</id>
<username>${your_username}</username>
<password>${your_password}</password>
</server>
</servers>
3.3 Database Configuration
PostgreSQL:
spring:
datasource:
dynamic:
lazy: false
enabled: true
primary: master
strict: false
grace-destroy: false
druid:
initial-size: 10
max-active: 10
datasource:
master:
url: jdbc:postgresql://${db_url}/${db_name}?userSSL=false¤tSchema=${schema}
username: ${db_username}
password: ${db_userpassword}
driver-class-name: org.postgresql.Driver
SQL Server / Fabric / Azure DB:
spring:
datasource:
dynamic:
lazy: false
enabled: true
primary: master
strict: false
grace-destroy: false
druid:
initial-size: 10
max-active: 10
fabric:
datasource:
master:
url: ${db_url1}
username: ${db_username1}
password: ${db_password1}
authentication: ActiveDirectoryServicePrincipal
3.4 MinIO Configuration (File Upload)
generator:
minio:
endpoint: ${endpoint}
accesskey: ${accesskey}
secretkey: ${secretkey}
bucketName: ${bucketName}
3.5 Swagger Configuration
Local Debug:
springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
api-docs:
path: /v3/api-docs
group-configs:
- group: 'generator'
paths-to-match: '/**'
packages-to-scan: com.benz.generator.controller
- group: 'generator-core'
paths-to-match: '/**'
packages-to-scan: com.benz.generator.core.controller
Access Swagger at: http://localhost:{port}/{context-path}/doc.html
Remote Server:
springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
config-url: ${dna_server_path}/${context-path}/v3/api-docs/swagger-config
disable-swagger-default-url: true
url: ${dna_server_path}/${context-path}/v3/api-docs
api-docs:
path: /v3/api-docs
3.6 Backend Project Structure
main
│── java
│ └── com.benz.generator.core
│ ├── base # Base Libraries
│ ├── cache # Caching
│ ├── config # Configuration Classes
│ ├── controller # Controller Layer
│ ├── dao # Data Access Layer
│ │ ├── entity # Entity Classes
│ │ └── mapper # MyBatis Mapper Interfaces
│ ├── dto # Data Transfer Objects
│ │ ├── convertor # DTO Converters
│ │ ├── gen # Generation-related DTOs
│ │ ├── pivot # Pivot-related DTOs
│ │ └── query # Query-related DTOs
│ ├── enumerate # Enumerations
│ ├── file # File Handling
│ ├── handler # Handlers
│ ├── init # Initialization
│ ├── log # Logging
│ ├── mapping # Mapping
│ ├── property # Property Configuration
│ ├── service # Service Layer
│ ├── tree # Tree Structure Operations
│ ├── util # Utilities
│ └── verify # Validation
└── resources
├── mapper # MyBatis XML Mapper Files
├── sql # SQL Scripts
├── static/templates # Code Generation Templates
└── *.properties # Property Files
4. Configuration-Driven Development
The standard function system is configuration-driven — most features can be enabled without writing code.
4.1 Table-Level Configuration (ads_tb_gen_table_info)
display_table_name Display name on frontend Text
template_address Upload template file name File path
sheet_name Upload template sheet name Sheet name
from_row Start row for uploaded data Number
target_schema Database schema Schema name
table_name Physical table name Table name
add_function Enable Add 1/0
delete_function Enable Delete 1/0
edit_function Enable Edit 1/0
export_function Enable Export 1/0
can_be_uploaded Enable Upload 1/0
operation_log_function Enable Business Log 1/0
filter_panel_function Enable Filter Panel 1/0
pivot_function Enable Pivot 1/0
can_be_hierarchy Enable Hierarchy 1/0
only_upload_function Show in Upload Center only Y/N
4.2 Column-Level Configuration (ads_tb_gen_column_info)
column_name Database field name Text
type Field type varchar/int/datetime/etc.
display_name Frontend display name Text
seq Display sequence Number
can_be_edit Allow editing 1/0
can_be_add Show in Add form 1/0
must_have Required field 1/0
is_unique Business primary key 1/0
input_component Component type Drop Down List / Pop Up / null
pop_up_code Popup configuration code Code reference
drop_down_list_code Dropdown configuration code Code reference
if_cascade Cascading dropdown Y/N
drop_down_list_param_name Cascade field mapping field:param format
hierarchy_key Hierarchy key (one per table) 1/0
hierarchy_node_name Hierarchy display name 1/0
4.3 Dropdown Configuration (ads_tb_gen_advance_search)
code Unique dropdown code
type "Drop Down" or "Pop Up"
sql SQL query returning value and text columns
db Data source name (e.g., "master")
db_type Database type (e.g., "sqlserver")
4.4 Cascading Dropdown Parameters (ads_tb_gen_advance_search_param)
Configure cascading relationships between dropdowns:
Set if_cascade = Y on the dependent column
Set drop_down_list_param_name to {master_data_field}:{cascade_param}
4.5 Popup Column Configuration (ads_tb_gen_advance_search_column)
Configure which columns are displayed and filterable in popup dialogs.
5. Code Generation
5.1 Quick Generate via API
After starting the project locally, call the generator API:
Endpoint: POST /{context-path}/generator/generate
Parameters:
tableName Database table name Yes String
orderName Default sort field No String (default: update_time)
schema Database schema No String (default: dimension)
replaceConfig Reset configuration No Boolean
Or use the init-generate endpoint:
POST /{context-path}/generator/init-generate — Quickly generates standard interfaces and configuration records for a database table.
5.2 Generator Configuration
Entity Config audit Generate CRUD + audit fields (id, update_user, update_time) boolean
Entity Config orderByName Default sort field String
Entity Config schema Schema name String
Entity Config enhanceServiceName Enhanced service class name String
GlobalConfig datasource Data source name (e.g., "master") String
5.3 What Gets Generated
The code generator automatically creates:
Entity classes
MyBatis Mapper interfaces and XML files
Service layer
Controller endpoints (CRUD + upload + export + log)
Configuration records in table_info and column_info
6. Adding New Standard Functions
Step-by-Step Process
Create Database Table
Design your business table with appropriate columns
Include audit fields: id, update_user, update_time
Call Code Generation API
Use /generator/generate or /generator/init-generate
This creates backend code + default configuration
Customize Configuration
Adjust table_info: enable/disable features (add/edit/delete/export/upload/log/filter/pivot/hierarchy)
Configure column_info: display names, component types, visibility, required flags
Set up dropdowns/popups in advance_search
Configure Hierarchy (if needed)
Set can_be_hierarchy = true in table_info
Mark hierarchy_key and hierarchy_node_name in column_info
Hierarchy database tables (ads_tb_gen_hierarchy_info, ads_tb_gen_hierarchy_node) are auto-managed
Configure Upload Center (if needed)
Set only_upload_function = Y in table_info to appear in Upload Center
Configure template columns in column_info (template_coloumn, template_coloumn_name)
Deploy
Commit code to Git
Sync configuration data to target environment
Redeploy CodeSpaces
7. Deployment & Update
7.1 Local Development Deployment
Start backend: mvn spring-boot:run (or run from IDE)
Start frontend: npm start
Access: http://localhost:3000
7.2 DNA CodeSpaces Deployment
Push code to GHE repository (appropriate branch)
Ensure configuration data is synced to target database
Trigger CodeSpaces redeployment via DNA platform
Verify Swagger endpoints: https://{dna_url}/{server_path}/{context-path}/doc.html
7.3 Updating Standard Function Library
When a new version of code-generator-boot3-starter is released:
Update the version in pom.xml:
`xml
<dependency>
<groupId>com.benz.generator</groupId>
<artifactId>code-generator-boot3-starter</artifactId>
<version>{new-version}</version>
</dependency>
`
Run mvn clean install to fetch the new version
Check release notes for any breaking changes or new configuration options
Test locally before deploying to production
7.4 Permission Configuration
To enable authorization for your project, add the permission starter:
<dependency>
<groupId>com.benz.generator</groupId>
<artifactId>component-permission-spring-boot-starter</artifactId>
<version>${latest.version}</version>
</dependency>
Then initialize the permission tables:
t_component — Define your menu/page/button tree
t_ent_grp — Map to ALICE entitlement groups
t_ent_grp_component — Assign components to groups
t_ent_grp_table_info — Assign table permissions (1=Readonly, 2=Editable)
Sample SQL
For a complete working example, create the following tables:
-- Replace "std" with your schema name
CREATE TABLE std.app_tb_gen_sample (
cid varchar(100) NULL,
id varchar(100) NULL,
level1 varchar(100) NULL,
level2 varchar(100) NULL,
pop_value varchar(100) NULL,
pop_text varchar(100) NULL,
update_user varchar(100) NULL,
update_time datetime2(0) NULL
);
-- Dropdown lookup tables
CREATE TABLE std.app_tb_gen_demo_level1 (
level1 varchar(100) NULL
);
CREATE TABLE std.app_tb_gen_demo_level2 (
level1 varchar(100) NULL,
level2 varchar(100) NULL
);
-- Popup lookup table
CREATE TABLE std.app_tb_gen_demo_pop (
value varchar(100) NULL,
[text] varchar(100) NULL
);
Then configure via ads_tb_gen_table_info, ads_tb_gen_column_info, and ads_tb_gen_advance_search as described in sections above.
Related Links
Frontend Repository
Backend Repository
DnA Platform
SpreadJS Documentation
VTable Documentation
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
