Asp.net MVC VS ASP.net WebForms?(Asp.net MVC VS ASP.net WebForms?)
我正在使用VB / .Net Framework 2.0为一个公司企业网站开发一个新的项目,其中包含数据驱动的表单。 所以我应该进一步与Asp.net MVC或Asp.Net Web窗体和WHY? 我们现在还没有准备好用于Ajax,但后来。 并且我们也有DevExpress组件。
I am starting a new project in VB /.Net Framework 2.0 for a company corporate website with data driven forms. So should I go further with Asp.net MVC or Asp.Net web forms and WHY ??? We are not ready for Ajax now but later. And also we have DevExpress components.
原文:https://stackoverflow.com/questions/2415224
最满意答案
尽管我无法阻止文件被添加到战争中,但是在创建战争后我能够删除文件 - 部分归功于这个问题的提示: 是否有快速的方法从文件中删除文件罐子/战争,而不必提取罐子并重新创建它?
在我的
build.gradle
文件中,我使用exec
命令添加了war
命令,以便在创建war文件后运行命令。 该命令将从war中删除application.properties
文件。 这是任务扩展的样子:war << { exec { workingDir 'build/libs' commandLine 'zip', '-d', "${appName}-${appVersion}.war", 'WEB-INF/classes/application.properties' } }
简而言之,它将工作目录更改为gradle放置战争的位置,然后使用
zip
命令从战争中删除文件。Although I was not able to prevent a file from being added to the war, I was able to remove a file after the war was created - thanks in part to a tip from this question: Is there a quick way to delete a file from a Jar / war without having to extract the jar and recreate it?
In my
build.gradle
file I appended thewar
command with anexec
command so that I could run a command after the war file had been created. The command will remove theapplication.properties
file from the war. This is what the task extension looks like:war << { exec { workingDir 'build/libs' commandLine 'zip', '-d', "${appName}-${appVersion}.war", 'WEB-INF/classes/application.properties' } }
In short, it changes the working directory to the location that gradle places the war, and then uses the
zip
command to remove a file from the war.
相关问答
更多-
#2。 publications{}部分定义了发布的内容。 from components.java的行添加了jar文件。 如果您不想发布jar,请删除该行。 #1要发布war插件生成的war文件,请使用from components.web #2. The publications{} section defines what is published. The line from components.java adds the jar file. If you do not want to publi ...
-
WEB-INF/lib和WEB-INF/classes内容由war任务的单个属性classpath配置。 根据文件: 此类路径中的任何JAR或ZIP文件都包含在WEB-INF / lib目录中。 此类路径中的任何目录都包含在WEB-INF / classes目录中 因此,在您的情况下,类路径应该修改如下 war { def myJar = project(':my_jar_1').jar.outputs def myClassesAndResources = project(':my_jar ...
-
像War这样的任务类型不是为用户设计的。 通常更好(也更容易)编写插件(在最简单的情况下,只是apply from: "path/to/script.gradle"另一个构建脚本),而不是子类化和使用大量内部构件,它们使用预先配置任务他们的公共API。 例如: tasks.withType(War) { eachFile { FileCopyDetails details -> ... } } 如果绝对必要,这样的配置也可以进入子类的构造函数。 也就是说,我不确定你为什么要用Ant类来解决类加载器 ...
-
试试gradle-waroverlay-plugin 。 https://bintray.com/scalding/maven/gradle-waroverlay-plugin#read Try the gradle-waroverlay-plugin. https://bintray.com/scalding/maven/gradle-waroverlay-plugin#read
-
gradle如何只添加JavaScript文件到战争文件中的目录(gradle how to add only javascript files to a directory in the war file)[2022-02-12]
from方法使用字符串,而不是文件对象。 war{ into("js"){ from fileTree(dir: './src/main/typescrypt/').matching{ include('**/*.js) }.files.stream().map{ File->file.toString() }.collect(Collectors.toSet()) } the from method takes st ... -
尽管我无法阻止文件被添加到战争中,但是在创建战争后我能够删除文件 - 部分归功于这个问题的提示: 是否有快速的方法从文件中删除文件罐子/战争,而不必提取罐子并重新创建它? 在我的build.gradle文件中,我使用exec命令添加了war命令,以便在创建war文件后运行命令。 该命令将从war中删除application.properties文件。 这是任务扩展的样子: war << { exec { workingDir 'build/libs' commandL ...
-
默认情况下,进入WEB-INF/classes是main源集的输出(已编译的类和已处理的资源)。 您的构建脚本声明了一个额外的源目录( src ),并保留了默认的资源目录。 你有src/main/java或src/main/resources吗? By default, what goes into WEB-INF/classes is the output of the main source set (compiled classes and processed resources). Your bui ...
-
由Gradle构建的War文件没有找到带有withspace的资源(War file, build by Gradle, do not find resource with withspace)[2023-10-08]
发现问题,它基于gradle中缺少的BOM。 我跳过了VAADIN BOM,但它正在更新一些VAADIN依赖项的版本...... Found the issue, it was based on missing BOMs in gradle. I skipped the VAADIN BOM but it was updating the version of some VAADIN dependencies... -
我将为每个war文件创建一个Zip任务,并将所有任务连接到DAG,方法是将它们全部assemble FileTree warFiles = fileTree(dir: 'path/to/wars', includes: ['**/*.war']) warFiles.files.each { File warFile -> String taskName = "tweakWar${warFile.name.replace('.war', '')}" Zip tweakWarTask = tas ...
-
当我有像我希望生成构建任务的图像之类的公共资源时,我会执行以下操作: sourceSets { main { resources.srcDirs += "src-gen/main/resources" } } // (include your configurations block and extractApi task here) processResources.dependsOn extractApi task cleanGen << { file('src- ...