使用spring 4和maven,我习惯于创建分层应用程序,其中子项目编译成war,根项目编译成war。例如
Web Layer
|
Service Layer
|
Dao Layer
(Shared Common Project)
使用此体系结构,我还可以创建两个具有公共父pom并共享相同子项目的Web应用程序
Web Layer Admin Web Layer
\ /
|
Service Layer
|
Dao Layer
我是ASP.NET MVC 5的新手,我想构建一个小项目来解决一些问题。当我在浏览器中打开项目时,发现了一个错误:
Compiler Error Message: CS0234: The type or namespace name 'Ajax' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)
Source Error:
Line 22: using System.Web.WebPages;
Line 23: u
FrameWork:.Net Framework4.7.2.
Web 项目:从git中提取代码(在不同的本地机器上工作和编译),然后尝试构建,得到:
**The type or namespace name 'ApiController' could not be found (are you missing a using directive or an assembly reference?)**
对于所有apiController继承的类属性和关键字:ApiController、HttpPost、FromBody等),
using System;
using System
我使用了Web应用程序和Windows服务调用的类库。所有这些都包含在一个单一的解决方案中。
我想在类库中基于应用程序调用(Web /WindowsService)执行一些代码。我偶然发现编译符号,并试图实现它,但这是行不通的。
请查找以下代码:
#if WEB
//call from web
//perform operation related to web
#endif
#if WindowsService
//call from WindowsService
//perform operation related to