Liquibase,本地XSD参考

时间:2015-11-10 11:17:31

标签: java xml spring xsd liquibase

我正在使用我的liquibase xml配置文件(spring integration)和后续符号

protected void onCreate(Bundle paramBundle)
{
    super.onCreate(paramBundle);
    SharedPreferences sharedPreferences = getSharedPreferences("myPref", 0);

    // get the last chosen sticker
    int sticker = sharedPreferences.getInt("chosenSticker", R.drawable.normal);  //the .normal is the default value in case the user didn't choose one.
    myView.setImageViewResource(R.id.imageview, sticker);  //now you can use it


    // store user's choice for example:
    View.OnClickListener local2 = new View.OnClickListener()
    {
        public void onClick(View paramAnonymousView)
        {
            SharedPreferences.Editor editor = sharedPreferences.edit();
            editor.putInt("chosenSticker", R.drawable.belton);
            editor.apply();

            // your rest of your code here ...
        }
    }
}

所以..我会使用我的应用程序离线模式,并将“classpath”表示法放入我的更改日志中:

<databaseChangeLog 
      xmlns="http://www.liquibase.org/xml/ns/dbchangelog" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog  
      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">

但我有跟随错误。你能救我吗?

<databaseChangeLog 
      xmlns="http://www.liquibase.org/xml/ns/dbchangelog" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog  
      classpath:xsd/dbchangelog-3.1.xsd">

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,

修理如下:

<databaseChangeLog
        xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog dbchangelog-3.5.xsd">

并添加liquibase xml配置文件位置

dbchangelog-3.5.xsd