一 问题描述:
1.1 建表语句
-- drop datle
drop table CMS_CHANNEL;
-- Create table
create table CMS_CHANNEL
(
ID NUMBER not null,
PARENT_ID NUMBER,
NAME VARCHAR2(100),
KEYWORDS VARCHAR2(100),
CHANNEL_URL VARCHAR2(500),
OUT_SITE_URL VARCHAR2(200),
SHOW_POSTION NUMBER,
SHOW_LOCATION NUMBER,
STATUS NUMBER,
ACTION_FLAG NUMBER,
INDUSTRY_ID NUMBER,
ID_NO VARCHAR2(50),
LANGUAGE NUMBER,
CLIENT NUMBER,
CREATE_TIME TIMESTAMP(6),
UPDATE_TIME TIMESTAMP(6)
) ;
-- Add comments to the table
comment on table CMS_CHANNEL is '栏目管理表';
-- Add comments to the columns
comment on column CMS_CHANNEL.ID is '栏目主键';
comment on column CMS_CHANNEL.PARENT_ID is '父栏目ID(根目录为0)';
comment on column CMS_CHANNEL.NAME is '栏目名称';
comment on column CMS_CHANNEL.KEYWORDS is '关键词';
comment on column CMS_CHANNEL.CHANNEL_URL is '栏目路径';
comment on column CMS_CHANNEL.OUT_SITE_URL is '站外路径';
comment on column CMS_CHANNEL.SHOW_POSTION is '显示顺序';
comment on column CMS_CHANNEL.SHOW_LOCATION is '显示位置';
comment on column CMS_CHANNEL.STATUS is '状态';
comment on column CMS_CHANNEL.ACTION_FLAG is '删除标识';
comment on column CMS_CHANNEL.INDUSTRY_ID is '行业类别';
comment on column CMS_CHANNEL.ID_NO is '栏目管理表ID编码';
comment on column CMS_CHANNEL.LANGUAGE is '语言';
comment on column CMS_CHANNEL.CLIENT is '显示的客户端';
comment on column CMS_CHANNEL.CREATE_TIME is '创建时间';
comment on column CMS_CHANNEL.UPDATE_TIME is '更新时间';
-- Create/Recreate primary, unique and foreign key constraints
alter table CMS_CHANNEL
add primary key (ID)
using index
tablespace DSW
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create sequence
create sequence CMS_CHANNEL_SEQ
minvalue 1
maxvalue 999999999999999999999999999
start with 1
increment by 1
cache 20;
--Create trigger
create or replace trigger CMS_CHANNEL_TRI
before insert on CMS_CHANNEL
REFERENCING OLD AS "OLD" NEW AS "NEW" FOR EACH ROW
begin
SELECT CMS_CHANNEL_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;
end;
二 项目启动后,页面显示
三 原因分析:
3.1 先检查数据库保存的数据
3.2 查看mybatis配置
这边配置错了,故需要改成正确的配置为: