配置文件分为2个版本:.Net Framework (web.config)和 .Net Core(appsettings.json)


.Net Framework(web.config)


<appSettings>

    <!--数据库Key前缀-->

    <add key="OrangeCloud.Core.DatabaseKey.Prefix" value="" />

    <!--数据库Key后缀-->

    <add key="OrangeCloud.Core.DatabaseKey.Suffix" value="" />

    <!--数据库Config.Value是否加密 true,false-->

    <add key="OrangeCloud.Core.DatabaseConfig.Encryption" value="false" />

    <!--单点登录Cookie Name-->

    <add key="OrangeCloud.Cookie.Login" value="OrangeCloudOMS" />

    <!--填充系统字段映射的实现类-->

    <add key="OrangeCloud.Core.FillEntity" value="OrangeCloud.Entity,OrangeCloud.Entity,FillEntity" />

    <!--配置是否输出SQL语句、输出路径-->

    <add key="SaveLog" value="false" />

    <add key="SavePath" value="F:\\Log\\" />

    <!--分布式缓存:OCache-->

    <add key="CacheServerList" value="localhost:10200" />

    <!--分布式缓存:Redis-->

    <add key="RedisServerList" value="127.0.0.1:6379" />

    <!-- 上传文件的服务器地址-->

    <add key="UploadServerList" value="localhost:10300" />

    <!-- 文件服务器的地址 ,用于查看文件-->

    <add key="UploadFileUrl" value="http://cdn.xxx.com/" />

  </appSettings>

  <connectionStrings>

    <add name="DBWrite" connectionString="server=127.0.0.1\SQL2016,1433;database=DB;uid=sa;pwd=123456;" />

    <add name="DBRead" connectionString="server=127.0.0.1\SQL2016,1433;database=DB;uid=sa;pwd=123456;" />

  </connectionStrings>


.Net Coreappsettings.json


{

  "ConfigType": "Production",

  "OrangeCloud.Core.DataTable.Type": "SqlServer", //数据库类型:(SqlServer;MySql;)

  "OrangeCloud.Core.DatabaseKey.Prefix": "", //数据库Key前缀

  "OrangeCloud.Core.DatabaseKey.Suffix": "", //数据库Key后缀

  "OrangeCloud.Core.DatabaseConfig.Encryption": false, //数据库Config.Value是否加密 true,false

  "OrangeCloud.Core.FillEntity": "OrangeCloud.CoreEntity,OrangeCloud.CoreEntity,FillEntity", //填充系统字段映射的实现类

  "OrangeCloud.Core.IsDebug": false, //是否是调试(true=调试模式:忽略菜单权限, false=正式环境)

  "OrangeCloud.Log.IsSave": false, //是否输出SQL语句

  "OrangeCloud.Log.SavePath": "E:\\Log\\", //输出路径

  "OrangeCloud.Cookie.Login": "OrangeCloudOMS", //单点登录Cookie Name

  "OrangeCloud.Cache.ServerList": "192.168.91.1:10600", //分布式缓存服务器:OCache

  "OrangeCloud.Redis.ServerList": "127.0.0.1:6379", //分布式缓存服务器:Redis

  "OrangeCloud.Upload.ServerList": "192.168.91.1:10300", //分布式上传服务器

  "OrangeCloud.Upload.FileUrl": "http://cdn.xxx.com/", //分布式文件查看地址


  "DBWrite": "server=127.0.0.1\\SQL2016,1433;database=DB;uid=sa;pwd=123456;",

  "DBRead": "server=127.0.0.1\\SQL2016,1433;database=DB;uid=sa;pwd=123456;"

}