baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
@@ -0,0 +1,26 @@
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Cors;
|
||||
using System.Web.Http.Routing;
|
||||
|
||||
namespace GXWebApi
|
||||
{
|
||||
public static class WebApiConfig
|
||||
{
|
||||
public static void Register(HttpConfiguration config)
|
||||
{
|
||||
// 跨域配置
|
||||
var cors = new EnableCorsAttribute("*", "*", "*");
|
||||
config.EnableCors(cors);
|
||||
|
||||
// 路由配置
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "DefaultApi",
|
||||
routeTemplate: "api/{controller}/{action}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
|
||||
// log4net 配置
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user