Index: ssts-web/build.gradle =================================================================== diff -u -r12805 -r16471 --- ssts-web/build.gradle (.../build.gradle) (revision 12805) +++ ssts-web/build.gradle (.../build.gradle) (revision 16471) @@ -63,6 +63,28 @@ from './build/resources/main' into webAppClassesDir include '**/*.*' + + /* 如果是中大五院的项目,Spring Security的XML配置文件,使用在projects\zd5y文件夹下的, + 因此通过下面的代码删除在resources下面的文件 + */ + + //获取web项目的文件夹路径 + def webProjectDir = this.projectDir.getAbsolutePath() + + def props = new Properties() + + new File(webProjectDir + "/src/main/resources/jdbc.properties").withInputStream { + stream -> props.load(stream) + } + // 获取jdbc.properties文件中定义的项目的名字 + def projectName = props["project"] + + if (projectName == 'zd5y'){ + println "war 项目名称:" + projectName + + exclude "**/spring/applicationContext-acegi-security.xml" + } + } }