Announcement Announcement Module
Collapse
No announcement yet.
1.2.release do not support asian language? Lexical error ... Encountered: "\r" (13) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 1.2.release do not support asian language? Lexical error ... Encountered: "\r" (13)

    same code it always throws below error in 1.2.release. but 1.1.5.release is no error
    Code:
        ____  ____  ____
       / __ \/ __ \/ __ \
      / /_/ / / / / / / /
     / _, _/ /_/ / /_/ /
    /_/ |_|\____/\____/    1.2.0.RELEASE [rev 39eb957]
    
    
    Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
    Encountered " <IDENTIFIER> "\u7487\u4f77\u6b22\u7eeb\u8bf2\u7037 "" at line 40, column 115.
    Was expecting one of:
        "instanceof" ...
        ")" ...
        "," ...
        "<" ...
        "?" ...
        "==" ...
        "<=" ...
        ">=" ...
        "!=" ...
        "||" ...
        "&&" ...
        "+" ...
        "-" ...
        "*" ...
        "/" ...
        "&" ...
        "|" ...
        "^" ...
        "%" ...
        ">" ...
    
    Encountered " "true" "true "" at line 53, column 115.
    Was expecting one of:
        "instanceof" ...
        ")" ...
        "," ...
        "<" ...
        "?" ...
        "==" ...
        "<=" ...
        ">=" ...
        "!=" ...
        "||" ...
        "&&" ...
        "+" ...
        "-" ...
        "*" ...
        "/" ...
        "&" ...
        "|" ...
        "^" ...
        "%" ...
        ">" ...
    
    Lexical error at line 69, column 116.  Encountered: "\r" (13), after : "\"\u9422\u3126\u57db\u7f01?).persist();"
    Lexical error at line 102, column 34.  Encountered: "\r" (13), after : "\"\u7ecc?);"

    this is my code
    Code:
    //@Service
    public class IdentityService {
    
        @Autowired
        IdentityStore istore;
    
        @Transactional
        public void preConfig() {
            System.out.println("----------------------------------------------------");
            //初始化标识类型
            if (!IdentityType.exist(IdentityType.USER)) {
                IdentityType idType = new IdentityType(IdentityType.USER, true, "用户");
                idType.persist();
                //可选属性
                new IdentityAttributeMeta(idType, "nickName", "java.lang.String", false, true, false, null, "昵称", "", "").persist();
                new IdentityAttributeMeta(idType, "serialNumber", "java.lang.String", false, true, false, null, "编号(工号、卡号、客户ID)", "", "").persist();
                new IdentityAttributeMeta(idType, "certificateType", "java.lang.String", false, true, false, "身份证", "证件类型", "", "").persist();
                new IdentityAttributeMeta(idType, "certificateNo", "java.lang.String", false, true, false, "", "证件号码", "", "").persist();
                new IdentityAttributeMeta(idType, "certificateAddr", "java.lang.String", false, true, false, "", "证件地址", "", "").persist();
                new IdentityAttributeMeta(idType, "organization", "java.lang.String", false, true, false, null, "机构名称", "", "").persist();
    
                //强制属性--扩展
                new IdentityAttributeMeta(idType, "surname", "java.lang.String", true, true, false, null, "姓氏", "", "").persist();
                new IdentityAttributeMeta(idType, "trueName", "java.lang.String", true, true, false, null, "名称", "", "").persist();
                new IdentityAttributeMeta(idType, "phone", "java.lang.String", true, true, false, null, "联系电话", "****-********(****)", "").persist();
                new IdentityAttributeMeta(idType, "address", "java.lang.String", true, true, false, null, "通讯地址", "", "").persist();
                new IdentityAttributeMeta(idType, "email", "java.lang.String", true, true, false, null, "邮箱", "*@*.*", "").persist();
    
                //强制属性--只读
    //            new IdentityAttributeMeta(idType, "audited", "java.lang.Boolean", true, true, true, null, "注册已审核", "true|false", "").persist();
                new IdentityAttributeMeta(idType, "creator", "java.lang.Long", true, true, true, null, "创建人ID", "", "").persist();
                new IdentityAttributeMeta(idType, "auditor", "java.lang.Long", true, true, true, null, "审核人ID", "", "").persist();
    
                //覆盖属性--凭证属性
                new IdentityAttributeMeta(idType, IdentityCredential.CREDENTIAL_TYPE, "java.lang.String", false, false, true, IdentityCredentialType.BINARY, "凭证类型", "", "").persist();
                new IdentityAttributeMeta(idType, IdentityCredential.CREDENTIAL, "java.lang.String", false, false, true, "000000", "初始凭证", "", "").persist();
                new IdentityAttributeMeta(idType, IdentityCredential.EXPIRED_DAYS, "java.lang.Integer", false, false, true, "30", "提示凭证过期天数", "", "").persist();
                //覆盖属性--实体属性
                new IdentityAttributeMeta(idType, "enabled", "java.lang.Boolean", false, false, true, "true", "启用", "true|false", "").persist();
                new IdentityAttributeMeta(idType, "expiredDate", "java.util.Calendar", false, false, true, null, "到期标识失效日期", "yyyy-MM-dd HH:mm:ss", "").persist();
                new IdentityAttributeMeta(idType, "lockedExpiredDate", "java.util.Calendar", false, false, true, null, "截至日期锁定标识", "yyyy-MM-dd HH:mm:ss", "").persist();
    
            }
    
            if (!IdentityType.exist(IdentityType.ORGANIZATION)) new IdentityType(IdentityType.ORGANIZATION, false, "机构").persist();
    //        if (!IdentityType.exist(IdentityType.GROUP)) new IdentityType(IdentityType.GROUP, false, "用户组").persist();
            if (!IdentityType.exist(IdentityType.DEPARTMENT)) new IdentityType(IdentityType.DEPARTMENT, false, "部门").persist();
            if (!IdentityType.exist(IdentityType.MENU)) {
                IdentityType mType = new IdentityType(IdentityType.MENU, false, "菜单");
                mType.persist();
                new IdentityAttributeMeta(mType, "enabled", "java.lang.Boolean", false, false, true, "true", "启用", null, null).persist();
                new IdentityAttributeMeta(mType, "href", "java.lang.String", true, false, true, null, "链接", null, null).persist();
                new IdentityAttributeMeta(mType, "actions", "java.lang.String", true, false, true, null, "事件逗单", null, null).persist();
                new IdentityAttributeMeta(mType, "icon", "java.lang.String", true, false, true, null, "图标", null, null).persist();
            }
    
            //初始化凭证类型
            if (!IdentityCredentialType.exist("name", IdentityCredentialType.PASSWORD)) new IdentityCredentialType(IdentityCredentialType.PASSWORD).persist();
            if (!IdentityCredentialType.exist("name", IdentityCredentialType.BINARY)) new IdentityCredentialType(IdentityCredentialType.BINARY).persist();
    
            //初始化关系类型
            if (!IdentityRelationshipType.exist(IdentityRelationshipType.MEMBERSHIP)) new IdentityRelationshipType(IdentityRelationshipType.MEMBERSHIP).persist();
            if (!IdentityRelationshipType.exist(IdentityRelationshipType.ROLE)) new IdentityRelationshipType(IdentityRelationshipType.ROLE).persist();
    
            testUserRegist();
            testURL();
    
        }
    
    .......
Working...
X