激情五月天婷婷,亚洲愉拍一区二区三区,日韩视频一区,a√天堂中文官网8

<ul id="buwfs"><strike id="buwfs"><strong id="buwfs"></strong></strike></ul>
    <output id="buwfs"></output>
  • <dfn id="buwfs"><source id="buwfs"></source></dfn>
      <dfn id="buwfs"><td id="buwfs"></td></dfn>
      <div id="buwfs"><small id="buwfs"></small></div>
      <dfn id="buwfs"><source id="buwfs"></source></dfn>
      1. <dfn id="buwfs"><td id="buwfs"></td></dfn>
        始創(chuàng)于2000年 股票代碼:831685
        咨詢熱線:0371-60135900 注冊(cè)有禮 登錄
        • 掛牌上市企業(yè)
        • 60秒人工響應(yīng)
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補(bǔ)償
        全部產(chǎn)品
        您的位置: 網(wǎng)站首頁(yè) > 幫助中心>文章內(nèi)容

        Spring Security ACL使用Oracle數(shù)據(jù)庫(kù)的配置與數(shù)據(jù)庫(kù)腳本

        發(fā)布時(shí)間:  2012/9/16 14:30:29

        在Spring Security的官方文檔上面只給出了關(guān)于security ACL的hsql腳本,但是在使用Oracle數(shù)據(jù)庫(kù)時(shí)spring沒有明確給出數(shù)據(jù)庫(kù)創(chuàng)建腳本和配置說(shuō)明,以下是自己在使用Oracle數(shù)據(jù)庫(kù)時(shí)使用到的sql腳本和配置

        sql腳本如下

        --------------------------------------------------------   
        -- Create sequences   
        --------------------------------------------------------   
        CREATE SEQUENCE "ACL_CLASS_SEQ"  
          INCREMENT BY 1  
          MAXVALUE 9999999999999999999999999999  
          START WITH 1  
          CACHE 20  
          NOORDER   
          NOCYCLE;   
            
        CREATE SEQUENCE "ACL_ENTRY_SEQ"  
          INCREMENT BY 1  
          MAXVALUE 9999999999999999999999999999  
          START WITH 1  
          CACHE 20  
          NOORDER   
          NOCYCLE;   
            
        CREATE SEQUENCE "ACL_OBJECT_IDENTITY_SEQ"  
          INCREMENT BY 1  
          MAXVALUE 9999999999999999999999999999  
          START WITH 1  
          CACHE 20  
          NOORDER   
          NOCYCLE;   
            
        CREATE SEQUENCE "ACL_SID_SEQ"  
          INCREMENT BY 1  
          MAXVALUE 9999999999999999999999999999  
          START WITH 1  
          CACHE 20  
          NOORDER   
          NOCYCLE;   
            
        --------------------------------------------------------   
        -- ACL_CLASS Table   
        --------------------------------------------------------   
        CREATE TABLE "ACL_CLASS" (   
          "ID" NUMBER(19,0) NOT NULL,   
          "CLASS" VARCHAR2(100) NOT NULL,   
          PRIMARY KEY ("ID"),   
          CONSTRAINT "ACL_CLASS_CLASS_UQ" UNIQUE ("CLASS")   
        )TABLESPACE &TSDATA;   
            
        --------------------------------------------------------   
        -- ACL_ENTRY Table   
        --------------------------------------------------------   
        CREATE TABLE "ACL_ENTRY" (   
          "ID" NUMBER(19,0) NOT NULL,   
          "ACL_OBJECT_IDENTITY" NUMBER(19,0) NOT NULL,   
          "ACE_ORDER" NUMBER(19,0) NOT NULL,   
          "SID" NUMBER(19,0) NOT NULL,   
          "MASK" NUMBER(19,0) NOT NULL,   
          "GRANTING" NUMBER(1,0) NOT NULL,   
          "AUDIT_SUCCESS" NUMBER(1,0) NOT NULL,   
          "AUDIT_FAILURE" NUMBER(1,0) NOT NULL,   
          PRIMARY KEY ("ID"),   
          CONSTRAINT "ACL_ENTRY_IDENT_ORDER_UQ" UNIQUE ("ACL_OBJECT_IDENTITY", "ACE_ORDER")   
        )TABLESPACE &TSDATA;   
            
        ALTER TABLE "ACL_ENTRY" ADD CONSTRAINT "ACL_ENTRY_GRANTING_CK"  
          CHECK ("GRANTING" in (1,0));   
        ALTER TABLE "ACL_ENTRY" ADD CONSTRAINT "ACL_ENTRY_AUDIT_SUCCESS_CK"  
          CHECK ("AUDIT_SUCCESS" in (1,0));   
        ALTER TABLE "ACL_ENTRY" ADD CONSTRAINT "ACL_ENTRY_AUDIT_FAILURE_CK"  
          CHECK ("AUDIT_FAILURE" in (1,0));   
            
        --------------------------------------------------------   
        -- ACL_OBJECT_IDENTITY Table   
        --------------------------------------------------------   
        CREATE TABLE "ACL_OBJECT_IDENTITY" (   
          "ID" NUMBER(19,0) NOT NULL,   
          "OBJECT_ID_CLASS" NUMBER(19,0) NOT NULL,   
          "OBJECT_ID_IDENTITY" NUMBER(19,0) NOT NULL,   
          "PARENT_OBJECT" NUMBER(19,0),   
          "OWNER_SID" NUMBER(19,0) NOT NULL,   
          "ENTRIES_INHERITING" NUMBER(1,0) NOT NULL,   
          PRIMARY KEY ("ID"),   
          CONSTRAINT "ACL_OBJ_ID_CLASS_IDENT_UQ" UNIQUE ("OBJECT_ID_CLASS", "OBJECT_ID_IDENTITY")   
        )TABLESPACE &TSDATA;   
            
        ALTER TABLE "ACL_OBJECT_IDENTITY" ADD CONSTRAINT "ACL_OBJ_ID_ENTRIES_CK"  
          CHECK ("ENTRIES_INHERITING" in (1,0));   
            
        --------------------------------------------------------   
        -- ACL_SID Table   
        --------------------------------------------------------   
        CREATE TABLE "ACL_SID" (   
          "ID" NUMBER(19,0) NOT NULL,   
          "PRINCIPAL" NUMBER(1,0) NOT NULL,   
          "SID" VARCHAR2(100) NOT NULL,   
          PRIMARY KEY ("ID"),   
          CONSTRAINT "ACL_SID_PRINCIPAL_SID_UQ" UNIQUE ("SID", "PRINCIPAL")   
        )TABLESPACE &TSDATA;   
            
        ALTER TABLE "ACL_SID" ADD CONSTRAINT "ACL_SID_PRINCIPAL_CK"  
          CHECK ("PRINCIPAL" in (1,0));   
            
        --------------------------------------------------------   
        -- Relationships   
        --------------------------------------------------------   
            
        ALTER TABLE "ACL_ENTRY" ADD CONSTRAINT "FK_ACL_ENTRY_ACL_OBJECT_ID"  
          FOREIGN KEY ("ACL_OBJECT_IDENTITY")   
          REFERENCES "ACL_OBJECT_IDENTITY" ("ID");   
        ALTER TABLE "ACL_ENTRY" ADD CONSTRAINT "FK_ACL_ENTRY_SID"  
          FOREIGN KEY ("SID")   
          REFERENCES "ACL_SID" ("ID");   
            
        ALTER TABLE "ACL_OBJECT_IDENTITY" ADD CONSTRAINT "FK_ACL_OBJ_ID_CLASS"  
          FOREIGN KEY ("OBJECT_ID_CLASS")   
          REFERENCES "ACL_CLASS" ("ID");   
        ALTER TABLE "ACL_OBJECT_IDENTITY" ADD CONSTRAINT "FK_ACL_OBJ_ID_PARENT"  
          FOREIGN KEY ("PARENT_OBJECT")   
          REFERENCES "ACL_OBJECT_IDENTITY" ("ID");   
        ALTER TABLE "ACL_OBJECT_IDENTITY" ADD CONSTRAINT "FK_ACL_OBJ_ID_SID"  
          FOREIGN KEY ("OWNER_SID")   
          REFERENCES "ACL_SID" ("ID");   
            
        --------------------------------------------------------   
        -- Triggers   
        --------------------------------------------------------   
        CREATE OR REPLACE TRIGGER "ACL_CLASS_ID"  
        BEFORE INSERT ON ACL_CLASS   
        FOR EACH ROW   
          BEGIN   
            SELECT ACL_CLASS_SEQ.NEXTVAL INTO :new.id FROM dual;   
          END;   
        /   
            
        CREATE OR REPLACE TRIGGER "ACL_ENTRY_ID"  
        BEFORE INSERT ON ACL_ENTRY   
        FOR EACH ROW   
          BEGIN   
            SELECT ACL_ENTRY_SEQ.NEXTVAL INTO :new.id FROM dual;   
          END;   
        /   
            
        CREATE OR REPLACE TRIGGER "ACL_OBJECT_IDENTITY_ID"  
        BEFORE INSERT ON ACL_OBJECT_IDENTITY   
        FOR EACH ROW   
          BEGIN   
            SELECT ACL_OBJECT_IDENTITY_SEQ.NEXTVAL INTO :new.id FROM dual;   
          END;   
        /   
            
        CREATE OR REPLACE TRIGGER "ACL_SID_ID"  
        BEFORE INSERT ON ACL_SID   
        FOR EACH ROW   
          BEGIN   
            SELECT ACL_SID_SEQ.NEXTVAL INTO :new.id FROM dual;   
          END;   
        /  

        spring配置片段如下

        <beans:bean id="aclService" class="org.springframework.security.acls.jdbc.JdbcMutableAclService">  
            <beans:constructor-arg ref="dataSource" />  
            <beans:constructor-arg ref="lookupStrategy" />  
            <beans:constructor-arg ref="aclCache" />  
               
            <beans:property name="classIdentityQuery" value="select ACL_CLASS_SEQ.currval from dual"/>  
            <beans:property name="sidIdentityQuery" value="select ACL_SID_SEQ.currval from dual"/>  
        </beans:bean> 


        本文出自:億恩科技【mszdt.com】

        服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

      2. 您可能在找
      3. 億恩北京公司:
      4. 經(jīng)營(yíng)性ICP/ISP證:京B2-20150015
      5. 億恩鄭州公司:
      6. 經(jīng)營(yíng)性ICP/ISP/IDC證:豫B1.B2-20060070
      7. 億恩南昌公司:
      8. 經(jīng)營(yíng)性ICP/ISP證:贛B2-20080012
      9. 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
      10. 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
      11. 專注服務(wù)器托管17年
        掃掃關(guān)注-微信公眾號(hào)
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問(wèn):河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
          0
         
         
         
         

        0371-60135900
        7*24小時(shí)客服服務(wù)熱線