Browse Source

pom.xml添加编码
java代码纠正乱码
修改logo
最后测试可以运行

liuyuqi 8 years ago
parent
commit
94461e9a96
25 changed files with 704 additions and 322 deletions
  1. 0 1
      .classpath
  2. 45 44
      pom.xml
  3. 1 1
      src/main/java/com/cloudcross/ssp/service/ICodeSiteService.java
  4. 1 1
      src/main/java/com/cloudcross/ssp/service/IFinanceService.java
  5. 1 1
      src/main/java/com/cloudcross/ssp/service/impl/FinanceService.java
  6. 1 1
      src/main/java/com/cloudcross/ssp/service/impl/IndustryService.java
  7. 1 1
      src/main/java/com/cloudcross/ssp/service/impl/LogService.java
  8. 1 1
      src/main/java/com/cloudcross/ssp/service/impl/OperatorBalanceService.java
  9. 250 258
      src/main/java/com/cloudcross/ssp/web/advertiser/main/ad/target/CreateBannerController.java
  10. 1 3
      src/main/java/com/cloudcross/ssp/web/operator/main/ad/ZoneController.java
  11. 3 3
      src/main/resources/application.properties
  12. 31 0
      src/main/resources/application.properties.bak
  13. BIN
      src/main/upload/banner/355/20160215/1455503674239/1455503674196.png
  14. BIN
      src/main/upload/banner/355/20160215/1455503674239/small_1455503674196.png
  15. BIN
      src/main/webapp/WEB-INF/lib/spring-security-taglibs-3.1.1.RELEASE.jar
  16. BIN
      src/main/webapp/WEB-INF/lib/spring-security-taglibs.jar
  17. 2 4
      src/main/webapp/WEB-INF/pages/back/main/public-head.ftl
  18. 121 0
      src/main/webapp/WEB-INF/pages/tlds/security.tld
  19. 121 0
      src/main/webapp/WEB-INF/tlds/security.tld
  20. BIN
      src/main/webapp/assets/images/datacross.png
  21. BIN
      src/main/webapp/assets/images/datacross.png.old
  22. BIN
      src/main/webapp/assets/images/datacrosslogo.png
  23. BIN
      src/main/webapp/assets/images/datacrosslogo.png.old
  24. 121 0
      src/main/webapp/assets/tlds/security.tld
  25. 3 3
      src/test/resources/application-unit.properties

+ 0 - 1
.classpath

@@ -30,6 +30,5 @@
 			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

+ 45 - 44
pom.xml

@@ -18,8 +18,9 @@
 		<junit.version>4.8.2</junit.version>
 		<jetty.version>6.1.26</jetty.version>
 		<jdk.version>1.6</jdk.version>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 	</properties>
-	
+
 	<build>
 		<resources>
 			<resource>
@@ -56,33 +57,33 @@
 						</dependency>
 					</dependencies>
 				</plugin>
-				
+
 				<plugin>
-                    <groupId>org.eclipse.m2e</groupId>
-                    <artifactId>lifecycle-mapping</artifactId>
-                    <version>1.0.0</version>
-                    <configuration>
-                        <lifecycleMappingMetadata>
-                            <pluginExecutions>
-                                <pluginExecution>
-                                    <pluginExecutionFilter>
-                                        <groupId>org.apache.maven.plugins</groupId>
-                                        <artifactId>maven-compiler-plugin</artifactId>
-                                        <versionRange>[3.1,)</versionRange>
-                                        <goals>
-                                            <goal>testCompile</goal>
-                                            <goal>compile</goal>
-                                        </goals>
-                                    </pluginExecutionFilter>
-                                    <action>
-                                        <ignore/>
-                                    </action>
-                                </pluginExecution>
-                            </pluginExecutions>
-                        </lifecycleMappingMetadata>
-                    </configuration>
-                </plugin>
-				
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>org.apache.maven.plugins</groupId>
+										<artifactId>maven-compiler-plugin</artifactId>
+										<versionRange>[3.1,)</versionRange>
+										<goals>
+											<goal>testCompile</goal>
+											<goal>compile</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore />
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+
 				<plugin>
 					<artifactId>maven-war-plugin</artifactId>
 					<version>2.4</version>
@@ -91,7 +92,7 @@
 						<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
 					</configuration>
 				</plugin>
-				
+
 				<plugin>
 					<groupId>org.mortbay.jetty</groupId>
 					<artifactId>maven-jetty-plugin</artifactId>
@@ -100,7 +101,7 @@
 			</plugins>
 		</pluginManagement>
 	</build>
-	
+
 	<dependencies>
 		<!-- log4j integration -->
 		<dependency>
@@ -206,7 +207,7 @@
 			<artifactId>mybatis</artifactId>
 			<version>${mybatis.version}</version>
 		</dependency>
-		
+
 		<!-- Apache common -->
 		<dependency>
 			<groupId>org.apache.commons</groupId>
@@ -233,7 +234,7 @@
 			<artifactId>commons-fileupload</artifactId>
 			<version>1.3</version>
 		</dependency>
-		
+
 		<!-- Junit integration -->
 		<dependency>
 			<groupId>junit</groupId>
@@ -241,8 +242,8 @@
 			<version>${junit.version}</version>
 			<scope>test</scope>
 		</dependency>
-		
-		<!-- Jackson integration  for spring view -->
+
+		<!-- Jackson integration for spring view -->
 		<dependency>
 			<groupId>org.codehaus.jackson</groupId>
 			<artifactId>jackson-mapper-asl</artifactId>
@@ -253,14 +254,14 @@
 			<artifactId>jackson-core-asl</artifactId>
 			<version>${jackson.version}</version>
 		</dependency>
-		 
-		 <!-- Java mail integration  -->
-		 <dependency>
+
+		<!-- Java mail integration -->
+		<dependency>
 			<groupId>com.sun.mail</groupId>
 			<artifactId>javax.mail</artifactId>
 			<version>1.5.1</version>
 		</dependency>
-		
+
 		<!-- j2ee dependency -->
 		<dependency>
 			<groupId>javax.servlet</groupId>
@@ -274,18 +275,18 @@
 			<version>2.1</version>
 			<scope>provided</scope>
 		</dependency>
-		
+
 		<!-- json dependency -->
 		<dependency>
 			<groupId>org.json</groupId>
 			<artifactId>json</artifactId>
 			<version>20090211</version>
 		</dependency>
- <dependency>  
-        <groupId>net.sf.json-lib</groupId>  
-        <artifactId>json-lib</artifactId>  
-        <version>2.4</version> 
-        <classifier>jdk15</classifier> 
-    </dependency> 
+		<dependency>
+			<groupId>net.sf.json-lib</groupId>
+			<artifactId>json-lib</artifactId>
+			<version>2.4</version>
+			<classifier>jdk15</classifier>
+		</dependency>
 	</dependencies>
 </project>

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/ICodeSiteService.java

@@ -1,4 +1,4 @@
-package com.cloudcross.ssp.service;
+package com.cloudcross.ssp.service;
 
 import com.cloudcross.ssp.model.CodeSite;
 import com.cloudcross.ssp.base.service.IGenericService;

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/IFinanceService.java

@@ -1,4 +1,4 @@
-package com.cloudcross.ssp.service;
+package com.cloudcross.ssp.service;
 
 import java.util.List;
 import java.util.Map;

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/impl/FinanceService.java

@@ -1,4 +1,4 @@
-package com.cloudcross.ssp.service.impl;
+package com.cloudcross.ssp.service.impl;
 
 import java.util.List;
 import java.util.Map;

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/impl/IndustryService.java

@@ -1,4 +1,4 @@
-package com.cloudcross.ssp.service.impl;
+package com.cloudcross.ssp.service.impl;
 
 import java.util.HashMap;
 import java.util.List;

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/impl/LogService.java

@@ -1,4 +1,4 @@
-package com.cloudcross.ssp.service.impl;
+package com.cloudcross.ssp.service.impl;
 
 import java.util.Date;
 import java.util.HashMap;

+ 1 - 1
src/main/java/com/cloudcross/ssp/service/impl/OperatorBalanceService.java

@@ -1,4 +1,4 @@
-package com.cloudcross.ssp.service.impl;
+package com.cloudcross.ssp.service.impl;
 
 import java.util.HashMap;
 import java.util.List;

+ 250 - 258
src/main/java/com/cloudcross/ssp/web/advertiser/main/ad/target/CreateBannerController.java

@@ -1,31 +1,17 @@
 package com.cloudcross.ssp.web.advertiser.main.ad.target;
 
-import java.awt.Image;
 import java.awt.image.BufferedImage;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
 import java.io.IOException;
-import java.lang.Character.Subset;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import javax.imageio.ImageIO;
-import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
 import org.apache.commons.lang.ArrayUtils;
@@ -33,21 +19,21 @@ import org.apache.log4j.Logger;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
-import org.junit.internal.matchers.SubstringMatcher;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
-import org.springframework.util.FileCopyUtils;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
-import org.springframework.web.multipart.commons.CommonsMultipartResolver;
 
+import com.cloudcross.ssp.base.web.SimpleController;
+import com.cloudcross.ssp.common.Config;
+import com.cloudcross.ssp.common.consts.Status;
+import com.cloudcross.ssp.common.utils.Common;
+import com.cloudcross.ssp.common.utils.LangUtil;
+import com.cloudcross.ssp.common.utils.Pager;
 import com.cloudcross.ssp.model.Account;
 import com.cloudcross.ssp.model.AdGroup;
 import com.cloudcross.ssp.model.Advertiser;
@@ -55,7 +41,6 @@ import com.cloudcross.ssp.model.Banner;
 import com.cloudcross.ssp.model.BannerTemplate;
 import com.cloudcross.ssp.model.Log;
 import com.cloudcross.ssp.model.Order;
-import com.cloudcross.ssp.model.Size;
 import com.cloudcross.ssp.service.IAdGroupService;
 import com.cloudcross.ssp.service.IAdvertiserService;
 import com.cloudcross.ssp.service.IBannerService;
@@ -64,19 +49,6 @@ import com.cloudcross.ssp.service.ILogService;
 import com.cloudcross.ssp.service.IOrderService;
 import com.cloudcross.ssp.service.ISizeService;
 import com.cloudcross.ssp.service.impl.BannerService;
-import com.cloudcross.ssp.base.web.SimpleController;
-import com.cloudcross.ssp.common.Config;
-import com.cloudcross.ssp.common.consts.Status;
-import com.cloudcross.ssp.common.utils.DateUtil;
-import com.cloudcross.ssp.common.utils.DateUtil.DateFmts;
-import com.cloudcross.ssp.common.utils.Common;
-import com.cloudcross.ssp.common.utils.LangUtil;
-import com.cloudcross.ssp.common.utils.Pager;
-import com.cloudcross.ssp.common.utils.SWFHeader;
-
-
-
-
 
 /**
  * 创意创意列表。
@@ -85,14 +57,14 @@ import com.cloudcross.ssp.common.utils.SWFHeader;
  */
 @Controller
 @RequestMapping("/advertiser/main/ad/target/create-banner")
-public class CreateBannerController extends SimpleController{
+public class CreateBannerController extends SimpleController {
 	private Logger LOG = Logger.getLogger(CreateBannerController.class);
 	@Autowired
 	IBannerTemplateService bat;
 	@Autowired
 	IBannerService bs;
 	@Autowired
-	IOrderService orderService ;
+	IOrderService orderService;
 	@Autowired
 	IAdvertiserService advs;
 	@Autowired
@@ -107,76 +79,76 @@ public class CreateBannerController extends SimpleController{
 	ILogService logService;
 	@Autowired
 	Config config;
-//	@RequestMapping
-//    public String index(Model model,@RequestParam Long adGroupId) {
-//	model.addAttribute("adGroupId", adGroupId);
-//	return redirect(page("list"));
-//	}
-	//文件系统可上传的文件后缀集合
-		private static Set<String> noStuffixSet = new HashSet<String>();
-				
-			//初始化可上传文件后缀
-		static {
-				noStuffixSet.add("jpg");
-				noStuffixSet.add("gif");
-				noStuffixSet.add("png");
-			}
-	
+	// @RequestMapping
+	// public String index(Model model,@RequestParam Long adGroupId) {
+	// model.addAttribute("adGroupId", adGroupId);
+	// return redirect(page("list"));
+	// }
+	// 文件系统可上传的文件后缀集合
+	private static Set<String> noStuffixSet = new HashSet<String>();
+
+	// 初始化可上传文件后缀
+	static {
+		noStuffixSet.add("jpg");
+		noStuffixSet.add("gif");
+		noStuffixSet.add("png");
+	}
+
 	@RequestMapping("/list")
 	public String list(Model model, @RequestParam Map<String, Object> paramMap,
 			@RequestParam Long adGroupId,
-			@RequestParam(defaultValue = "1") int page,HttpServletRequest request) {
+			@RequestParam(defaultValue = "1") int page,
+			HttpServletRequest request) {
 		HttpSession session = request.getSession();
 		paramMap.put("adGroupId", adGroupId);
-		//根据投放名,查找所有创建列表找总数
+		// 根据投放名,查找所有创建列表找总数
 		int totalRow = bs.countByParams(paramMap);
-		LOG.debug("totalRow="+totalRow);
+		LOG.debug("totalRow=" + totalRow);
 		AdGroup adGroup = adGroupService.findById(adGroupId);
 		Long campaignId = adGroup.getCampaignId();
 		Long orderId = adGroup.getOrderId();
 		Order order = orderService.findById(orderId);
-		LOG.debug("order==="+order);
+		LOG.debug("order===" + order);
 		Long advertiserId = order.getAdvertiserId();
 		model.addAttribute("campaignId", campaignId);
 		model.addAttribute("orderId", orderId);
 		model.addAttribute("advertiserId", advertiserId);
-	 //查询符合条件的创意
+		// 查询符合条件的创意
 		Pager pager = new Pager();
 		pager.setPage(page);
 		pager.setTotalRow(totalRow);
 		List<Banner> createBannerList = bs.findByParams(paramMap, pager);
-		LOG.debug("createBannerList="+createBannerList);
+		LOG.debug("createBannerList=" + createBannerList);
 		model.addAllAttributes(paramMap);
 		model.addAttribute("pager", pager);
 		model.addAttribute("createBannerList", createBannerList);
 		model.addAttribute("adGroupId", adGroupId);
 		model.addAttribute("sessionid", session.getId());
 		return page("list");
-		}
-	
-	//删除之后状态变为-1 djp
+	}
+
+	// 删除之后状态变为-1 djp
 	@RequestMapping("/delete")
 	public @ResponseBody String delete(Long[] id) {
 		if (ArrayUtils.isNotEmpty(id)) {
-			bs.updateStatus(LangUtil.array2List(id), 
-					Status.delete.value);
+			bs.updateStatus(LangUtil.array2List(id), Status.delete.value);
 		}
 		return OK;
 	}
-	
 
 	@RequestMapping("/save")
-	public  String save(HttpServletRequest request, Model model,@RequestParam Map<String, Object> paramMap,@RequestParam(required = false) Long adGroupId) {
-	
-		
-		String bannerObjs = (String)paramMap.get("bannerObjs");
+	public String save(HttpServletRequest request, Model model,
+			@RequestParam Map<String, Object> paramMap,
+			@RequestParam(required = false) Long adGroupId) {
+
+		String bannerObjs = (String) paramMap.get("bannerObjs");
 		LOG.debug(bannerObjs);
-		//JSONArray result = new JSONArray(); // 用来存储转换结果的JSONArray
+		// JSONArray result = new JSONArray(); // 用来存储转换结果的JSONArray
 		List<Banner> bannerList = new ArrayList<Banner>();
-		try{
+		try {
 			JSONArray jsonArray = new JSONArray(bannerObjs);// 传过来JSONArray
-			LOG.debug("a111"+jsonArray);
-//		}
+			LOG.debug("a111" + jsonArray);
+			// }
 			for (int i = 0; i < jsonArray.length(); i++) {
 				JSONObject object = jsonArray.getJSONObject(i);
 				Banner banner = new Banner();
@@ -184,238 +156,258 @@ public class CreateBannerController extends SimpleController{
 				banner = bs.findById(banner.getId());
 				banner.setVisitAddress(object.getString("visitAddress"));
 				banner.setClickAddress(object.getString("clickAddress"));
-				banner.setImpressionAddress(object.getString("impressionAddress"));
+				banner.setImpressionAddress(object
+						.getString("impressionAddress"));
 				banner.getBannerTemplate().setName(object.getString("name"));
-				
+
 				/**
 				 * 先得到编辑前的信息
 				 */
 				Banner formerBanner = bannerService.findById(banner.getId());
-				
+
 				((BannerService) bs).edit(banner);
-				
+
 				/**
 				 * 编辑成功后,与以前的banner信息进行比较如果发生了变化,则添加修改记录
 				 */
-				//修改标志,默认为没有修改
+				// 修改标志,默认为没有修改
 				boolean updatedMark = false;
-				//存储修改的字符串
-				String str = "对原有的创意: " + formerBanner.getBannerTemplate().getName() + " 进行了修改:";
-				//创意名称的比较
-				if(!(formerBanner.getBannerTemplate().getName().equals(object.getString("name")))) {
-					str = str + "创意名称" + " " + formerBanner.getBannerTemplate().getName() + "-->" + banner.getBannerTemplate().getName();
+				// 存储修改的字符串
+				String str = "对原有的创意: "
+						+ formerBanner.getBannerTemplate().getName()
+						+ " 进行了修改:";
+				// 创意名称的比较
+				if (!(formerBanner.getBannerTemplate().getName().equals(object
+						.getString("name")))) {
+					str = str + "创意名称" + " "
+							+ formerBanner.getBannerTemplate().getName()
+							+ "-->" + banner.getBannerTemplate().getName();
 					updatedMark = true;
 				}
-				
-				//到达地址的比较
-				if(!(formerBanner.getVisitAddress().equals(banner.getVisitAddress()))) {
-					str = str + "到达地址" + " " + formerBanner.getVisitAddress() + "-->" + banner.getVisitAddress();
+
+				// 到达地址的比较
+				if (!(formerBanner.getVisitAddress().equals(banner
+						.getVisitAddress()))) {
+					str = str + "到达地址" + " " + formerBanner.getVisitAddress()
+							+ "-->" + banner.getVisitAddress();
 					updatedMark = true;
 				}
-				
-				//点击地址的比较
-				if(!(formerBanner.getClickAddress().equals(banner.getClickAddress()))) {
-					str = str + "点击地址" + " " + formerBanner.getClickAddress() + "-->" + banner.getClickAddress();
+
+				// 点击地址的比较
+				if (!(formerBanner.getClickAddress().equals(banner
+						.getClickAddress()))) {
+					str = str + "点击地址" + " " + formerBanner.getClickAddress()
+							+ "-->" + banner.getClickAddress();
 					updatedMark = true;
 				}
-				
-				//曝光地址的比较
-				if(!(formerBanner.getImpressionAddress().equals(banner.getImpressionAddress()))) {
-					str = str + "曝光地址" + " " + formerBanner.getImpressionAddress() + "-->" + banner.getImpressionAddress();
+
+				// 曝光地址的比较
+				if (!(formerBanner.getImpressionAddress().equals(banner
+						.getImpressionAddress()))) {
+					str = str + "曝光地址" + " "
+							+ formerBanner.getImpressionAddress() + "-->"
+							+ banner.getImpressionAddress();
 					updatedMark = true;
 				}
-				
-				Log log= new Log();
-				//对应模块
+
+				Log log = new Log();
+				// 对应模块
 				log.setModule("Ad");
-				//对应的表名
+				// 对应的表名
 				log.setTableName("t_banner");
-				//对应的bannerId
+				// 对应的bannerId
 				log.setRecordId(banner.getId());
-				//操作类型
-				log.setActionType("编辑");	
-				//变更详情
+				// 操作类型
+				log.setActionType("编辑");
+				// 变更详情
 				log.setAction(str);
-				//下面这几个字段目前后端数据没有得到。所以仅作测试用!
+				// 下面这几个字段目前后端数据没有得到。所以仅作测试用!
 				log.setActionTime("100");
 				log.setAccountId(new Long(getLoginUser().getId()));
 				log.setUserIp(Common.toIpAddr(request));
 				log.setAccountName(getLoginUser().getAccountName());
-				
-				//判断是否编辑前后的投放信息如果真的改变则添加修改日志
-				if(updatedMark) {
-				logService.add(log); 
-			}
-				
-				
-				bannerList.add(banner);	
-				LOG.debug("a222="+bannerList);
-			}
-		}catch (JSONException e) {
-				// TODO Auto-generated catch block
-				LOG.info("@@@@@@@@解析错误");
-				e.printStackTrace();
+
+				// 判断是否编辑前后的投放信息如果真的改变则添加修改日志
+				if (updatedMark) {
+					logService.add(log);
+				}
+
+				bannerList.add(banner);
+				LOG.debug("a222=" + bannerList);
 			}
+		} catch (JSONException e) {
+			// TODO Auto-generated catch block
+			LOG.info("@@@@@@@@解析错误");
+			e.printStackTrace();
+		}
 
 		model.addAttribute("adGroupId", adGroupId);
 		return redirect(page("../ad/list"));
-	
+
 	}
-	
-	
-	@RequestMapping(value="/upload")  
 
-	public @ResponseBody String upload(Model model,HttpServletRequest request) throws IOException{  
+	@RequestMapping(value = "/upload")
+	public @ResponseBody String upload(Model model, HttpServletRequest request)
+			throws IOException {
 		String uploadName;
 		String resetName;
 		String fileType;
-		//文件路径
+		// 文件路径
 		String path;
-		//缩略图路径
+		// 缩略图路径
 		String pathSmall;
-		String responseStr="null";
+		String responseStr = "null";
 		int width;
 		int height;
 		Long adGroupId = 1l;
 		Account loginUser = getLoginUser();
 		Long operatorId = loginUser.getOperatorId();
-	 
-	if(request.getMethod()=="POST"){ 
-	
-		//转换成多部分request    
-		MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest)request;
-		
-		String[] ids = multiRequest.getParameterValues("adGroupId");
-
-		Map<String, MultipartFile> fileMap = multiRequest.getFileMap(); 
-		try{
-		//取得request中的所有文件名 
-		  for(Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { 
-			MultipartFile file = entity.getValue();
-			BannerTemplate bannerTemplate = new BannerTemplate();
-			if(file != null && file.getSize()<1024*2*1000){ 
-				//取得当前上传文件的文件名称(不加路径)  
-				uploadName = file.getOriginalFilename();  
-				resetName = bannerTemplateService.resetName(uploadName);
-				//获取文件类型
-				 fileType = uploadName.substring(uploadName.lastIndexOf(".") + 1);
-				 
-				//判断文件类型
-				  if(!noStuffixSet.contains(fileType)){
-						return "不支持此文件类型";
-					}
-				 
-				//如果名称不为“”,说明该文件存在,否则说明该文件不存在  
-				if(uploadName.trim() !=""){  
-					
-					//处理上传文件路径
-					path = bannerTemplateService.getLocalFilePath(resetName);
-					
-					File localFile = new File(path); 
-					//上传目录不存在,则新建目录
-					if (!localFile.getParentFile().exists()){
-						localFile.getParentFile().mkdirs();
-					}	
-				file.transferTo(localFile);
-				
-				//取上传图片的宽高
-				 BufferedImage image = ImageIO.read(new FileInputStream(path));
-				 width = image.getWidth();
-				 height = image.getHeight();
-				//匹配广告位
-				 bannerTemplate=bannerTemplateService.suitSize(width,height, bannerTemplate);
-				//图片匹配
-					if(bannerTemplate==null){
-						return "图片尺寸错啦!!";
-					}
-				 
-				//取上传文件父级目录
-				String absolutePath = localFile.getParentFile().getAbsolutePath();
-				//生成缩略图路径名
-				pathSmall = absolutePath.concat(File.separator).concat("small_").concat(resetName);
-				//生成缩略图
-				bannerTemplateService.compressPicture(localFile,pathSmall,150,60);
-				//判断是否需要缩放
-				
-				 //设置文件上传路径
-				 bannerTemplate.setPath(bannerTemplateService.replacePath(path));
-
-				
-				//保存缩略图路径
-				bannerTemplate.setPathSmall(bannerTemplateService.replacePath(pathSmall));	
-				adGroupId =Long.parseLong(ids[0]);
-				AdGroup adGroup = adGroupService.findById(adGroupId);
-				Long campaignId = adGroup.getCampaignId();
-				Long orderId = adGroup.getOrderId();
-				Order order = orderService.findById(orderId); 
-				Long advertiserId = order.getAdvertiserId();
-				Advertiser advertiser = advs.findById(advertiserId);
-				Long agentId = advertiser.getAgentId();
-				model.addAttribute("campaignId",campaignId);
-				model.addAttribute("orderId",orderId);
-				model.addAttribute("advertiserId",advertiserId);
-				model.addAttribute("agentId", agentId);
-				
-				bannerTemplate.setName(uploadName);
-				bannerTemplate.setType(bannerTemplateService.judgeType(fileType));
-				bannerTemplate.setStatus(0);
-				bannerTemplate.setAdvertiserId(advertiserId);
-				bannerTemplate.setAgentId(agentId);
-				bannerTemplate.setOperatorId(operatorId);
-				//添加素材
-				bat.add(bannerTemplate);
-				
-				//创建创意
-				Banner banner = new Banner();
-				banner.setBannerTemplate(bannerTemplate);
-				banner.setAdGroupId(adGroupId);
-				banner.setBannerTemplateId(bannerTemplate.getId());
-				banner.setCampaignId(campaignId);
-				banner.setOrderId(orderId);
-				banner.setChecked(1);
-				banner.setMemo("");
-				banner.setStatus(0);
-				banner.setVisitAddress("visitAddress");
-				banner.setClickAddress("clickAddress");
-				banner.setImpressionAddress("impressionAddress");
-				boolean judge = bannerService.add(banner); 
-				
-				//添加创意,如果添加成功则添加新增日志
-					if(judge) {
-						responseStr="文件上传成功";
-						Log log = new Log();
-						//对应模块,这里应该是投放模块
-						log.setModule("Ad");
-						//对应的表名,这里是t_adgroup
-						log.setTableName("t_banner");
-						//对应的投放id
-						log.setRecordId(banner.getId());
-						//对应的操作类型
-						log.setActionType("新增");
-						//变更详情
-						log.setAction("新增了创意:" + bannerTemplate.getName());
-						log.setActionTime("100");
-						log.setAccountId(new Long(getLoginUser().getId()));
-						log.setUserIp(Common.toIpAddr(request));
-						log.setAccountName(getLoginUser().getAccountName());
-						logService.add(log);		
+
+		if (request.getMethod() == "POST") {
+
+			// 转换成多部分request
+			MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
+
+			String[] ids = multiRequest.getParameterValues("adGroupId");
+
+			Map<String, MultipartFile> fileMap = multiRequest.getFileMap();
+			try {
+				// 取得request中的所有文件名
+				for (Map.Entry<String, MultipartFile> entity : fileMap
+						.entrySet()) {
+					MultipartFile file = entity.getValue();
+					BannerTemplate bannerTemplate = new BannerTemplate();
+					if (file != null && file.getSize() < 1024 * 2 * 1000) {
+						// 取得当前上传文件的文件名称(不加路径)
+						uploadName = file.getOriginalFilename();
+						resetName = bannerTemplateService.resetName(uploadName);
+						// 获取文件类型
+						fileType = uploadName.substring(uploadName
+								.lastIndexOf(".") + 1);
+
+						// 判断文件类型
+						if (!noStuffixSet.contains(fileType)) {
+							return "不支持此文件类型";
+						}
+
+						// 如果名称不为“”,说明该文件存在,否则说明该文件不存在
+						if (uploadName.trim() != "") {
+
+							// 处理上传文件路径
+							path = bannerTemplateService
+									.getLocalFilePath(resetName);
+
+							File localFile = new File(path);
+							// 上传目录不存在,则新建目录
+							if (!localFile.getParentFile().exists()) {
+								localFile.getParentFile().mkdirs();
+							}
+							file.transferTo(localFile);
+
+							// 取上传图片的宽高
+							BufferedImage image = ImageIO
+									.read(new FileInputStream(path));
+							width = image.getWidth();
+							height = image.getHeight();
+							// 匹配广告位
+							bannerTemplate = bannerTemplateService.suitSize(
+									width, height, bannerTemplate);
+							// 图片匹配
+							if (bannerTemplate == null) {
+								return "图片尺寸错啦!!";
+							}
+
+							// 取上传文件父级目录
+							String absolutePath = localFile.getParentFile()
+									.getAbsolutePath();
+							// 生成缩略图路径名
+							pathSmall = absolutePath.concat(File.separator)
+									.concat("small_").concat(resetName);
+							// 生成缩略图
+							bannerTemplateService.compressPicture(localFile,
+									pathSmall, 150, 60);
+							// 判断是否需要缩放
+
+							// 设置文件上传路径
+							bannerTemplate.setPath(bannerTemplateService
+									.replacePath(path));
+
+							// 保存缩略图路径
+							bannerTemplate.setPathSmall(bannerTemplateService
+									.replacePath(pathSmall));
+							adGroupId = Long.parseLong(ids[0]);
+							AdGroup adGroup = adGroupService
+									.findById(adGroupId);
+							Long campaignId = adGroup.getCampaignId();
+							Long orderId = adGroup.getOrderId();
+							Order order = orderService.findById(orderId);
+							Long advertiserId = order.getAdvertiserId();
+							Advertiser advertiser = advs.findById(advertiserId);
+							Long agentId = advertiser.getAgentId();
+							model.addAttribute("campaignId", campaignId);
+							model.addAttribute("orderId", orderId);
+							model.addAttribute("advertiserId", advertiserId);
+							model.addAttribute("agentId", agentId);
+
+							bannerTemplate.setName(uploadName);
+							bannerTemplate.setType(bannerTemplateService
+									.judgeType(fileType));
+							bannerTemplate.setStatus(0);
+							bannerTemplate.setAdvertiserId(advertiserId);
+							bannerTemplate.setAgentId(agentId);
+							bannerTemplate.setOperatorId(operatorId);
+							// 添加素材
+							bat.add(bannerTemplate);
+
+							// 创建创意
+							Banner banner = new Banner();
+							banner.setBannerTemplate(bannerTemplate);
+							banner.setAdGroupId(adGroupId);
+							banner.setBannerTemplateId(bannerTemplate.getId());
+							banner.setCampaignId(campaignId);
+							banner.setOrderId(orderId);
+							banner.setChecked(1);
+							banner.setMemo("");
+							banner.setStatus(0);
+							banner.setVisitAddress("visitAddress");
+							banner.setClickAddress("clickAddress");
+							banner.setImpressionAddress("impressionAddress");
+							boolean judge = bannerService.add(banner);
+
+							// 添加创意,如果添加成功则添加新增日志
+							if (judge) {
+								responseStr = "文件上传成功";
+								Log log = new Log();
+								// 对应模块,这里应该是投放模块
+								log.setModule("Ad");
+								// 对应的表名,这里是t_adgroup
+								log.setTableName("t_banner");
+								// 对应的投放id
+								log.setRecordId(banner.getId());
+								// 对应的操作类型
+								log.setActionType("新增");
+								// 变更详情
+								log.setAction("新增了创意:"
+										+ bannerTemplate.getName());
+								log.setActionTime("100");
+								log.setAccountId(new Long(getLoginUser()
+										.getId()));
+								log.setUserIp(Common.toIpAddr(request));
+								log.setAccountName(getLoginUser()
+										.getAccountName());
+								logService.add(log);
+							}
+						}
+					} else {
+						return "图片尺寸超过2M啦";
 					}
 				}
-			}else{
-						  return "图片尺寸超过2M啦";
-				 }
+			} catch (IOException e) {
+				return "上传失败";
+			}
+
 		}
-	}catch(IOException e){
-			return "上传失败";
-						}
-			
+		return responseStr;
 	}
-			return responseStr;  
-}
 
-	
 }
-		 	 
-	
-	
-

+ 1 - 3
src/main/java/com/cloudcross/ssp/web/operator/main/ad/ZoneController.java

@@ -24,7 +24,6 @@ import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.log4j.Logger;
-import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -36,7 +35,6 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
 
-import com.cloudcross.ssp.model.Account;
 import com.cloudcross.ssp.base.utils.freemarker.FreemarkerTemplateProcessor;
 import com.cloudcross.ssp.base.web.SimpleController;
 import com.cloudcross.ssp.base.web.result.AjaxResult;
@@ -46,7 +44,7 @@ import com.cloudcross.ssp.common.utils.Common;
 import com.cloudcross.ssp.common.utils.LangUtil;
 import com.cloudcross.ssp.common.utils.Pager;
 import com.cloudcross.ssp.common.utils.Pager1;
-import com.cloudcross.ssp.model.BannerTemplate;
+import com.cloudcross.ssp.model.Account;
 import com.cloudcross.ssp.model.Industry;
 import com.cloudcross.ssp.model.Log;
 import com.cloudcross.ssp.model.Size;

+ 3 - 3
src/main/resources/application.properties

@@ -4,9 +4,9 @@ global.encoding=UTF-8
 
 #database setting
 jdbc.driver=com.mysql.jdbc.Driver
-jdbc.username=ssp_test
-jdbc.password=1q2w3e4r
-jdbc.url=jdbc:mysql://test.dc.loc:3306/ssp?useUnicode=true&amp;characterEncoding=UTF-8
+jdbc.username=lyq
+jdbc.password=123456
+jdbc.url=jdbc:mysql://localhost:3306/ssp?useUnicode=true&amp;characterEncoding=UTF-8
 
 #mail server setting
 mail.server=smtp.163.com

+ 31 - 0
src/main/resources/application.properties.bak

@@ -0,0 +1,31 @@
+#to be used
+global.locale=zh_CN
+global.encoding=UTF-8
+
+#database setting
+jdbc.driver=com.mysql.jdbc.Driver
+jdbc.username=ssp_test
+jdbc.password=1q2w3e4r
+jdbc.url=jdbc:mysql://test.dc.loc:3306/ssp?useUnicode=true&amp;characterEncoding=UTF-8
+
+#mail server setting
+mail.server=smtp.163.com
+mail.server.user=a502817870@163.com
+mail.server.password=MyLove520
+mail.from=a502817870@163.com
+mail.from.name=\u6D4B\u8BD5\u90AE\u4EF6
+mail.template.folder=mail
+
+#freemarker template setting
+template.load.dir=classpath:/template
+
+#where are resource upload into, relative to classpath
+resource.upload.domain=ssp.datacross.cn
+resource.upload.port=8080
+resource.upload.dir=upload
+
+#code address
+code.address = http://120.131.84.229
+#code.address = http://adx.datacross.cn
+
+#

BIN
src/main/upload/banner/355/20160215/1455503674239/1455503674196.png


BIN
src/main/upload/banner/355/20160215/1455503674239/small_1455503674196.png


BIN
src/main/webapp/WEB-INF/lib/spring-security-taglibs-3.1.1.RELEASE.jar


BIN
src/main/webapp/WEB-INF/lib/spring-security-taglibs.jar


+ 2 - 4
src/main/webapp/WEB-INF/pages/back/main/public-head.ftl

@@ -1,10 +1,8 @@
-<#assign sec=JspTaglibs["http://www.springframework.org/security/tags"]>
+<#assign sec=JspTaglibs["http://www.springframework.org/security/tags"] />
 <script type="text/javascript" src="${ctx}/assets/js/back/public-head.js"></script>
 <div id="headDiv">	
     <div id="logoa">
-	<img class="logo1" src="${ctx}/assets/images/datacross.png">		
-	<img class="logo2" src="${ctx}/assets/images/cut-off-rule.png">		
-	<img class="logo3" src="${ctx}/assets/images/wificross.png">	
+	<img class="logo1" src="${ctx}/assets/images/datacross.png">			
 	</div>	
 	<ul id="menu">
 		<li><a href="${ctx}/back/main/dashboard"><span>首页</span></a></li>

+ 121 - 0
src/main/webapp/WEB-INF/pages/tlds/security.tld

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+    <tlib-version>1.0</tlib-version>
+    <jsp-version>1.2</jsp-version>
+    <short-name>security</short-name>
+    <uri>http://www.springframework.org/security/tags</uri>
+    <description>
+        Spring Security Authorization Tag Library
+        $Id$
+    </description>
+
+    <tag>
+        <name>authorize</name>
+        <tag-class>org.springframework.security.taglibs.authz.AuthorizeTag</tag-class>
+        <description>
+            A simple tag to output or not the body of the tag if the principal
+            has or doesn't have certain authorities.
+        </description>
+
+        <attribute>
+            <name>ifNotGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles which the user must not have
+                for the body to be output.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>ifAllGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles which the user must all
+                possess for the body to be output.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>ifAnyGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles, one of which the user must
+                possess for the body to be output.
+            </description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>authentication</name>
+        <tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
+        <description>
+            Allows access to the current Authentication object.
+        </description>
+
+        <attribute>
+            <name>property</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                Property of the Authentication object which should be output. Supports nested
+                properties. For example if the principal object is an instance of UserDetails,
+                the property "principal.username" will return the username. Alternatively, using
+                "name" will call getName method on the Authentication object directly.
+            </description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Name of the exported scoped variable which will contain the
+                evaluated property of the Authentication object.
+            </description>
+        </attribute>
+        <attribute>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Scope for var.
+            </description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>accesscontrollist</name>
+        <tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
+        <description>
+            Allows inclusion of a tag body if the current Authentication
+            has one of the specified permissions to the presented
+            domain object instance.
+        </description>
+
+        <attribute>
+            <name>hasPermission</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of integers, each representing a
+                required bit mask permission from a subclass of
+                org.springframework.security.acl.basic.AbstractBasicAclEntry.
+            </description>
+        </attribute>
+        <attribute>
+            <name>domainObject</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                The actual domain object instance for which permissions
+                are being evaluated.
+            </description>
+        </attribute>
+    </tag>
+
+</taglib>

+ 121 - 0
src/main/webapp/WEB-INF/tlds/security.tld

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+    <tlib-version>1.0</tlib-version>
+    <jsp-version>1.2</jsp-version>
+    <short-name>security</short-name>
+    <uri>http://www.springframework.org/security/tags</uri>
+    <description>
+        Spring Security Authorization Tag Library
+        $Id$
+    </description>
+
+    <tag>
+        <name>authorize</name>
+        <tag-class>org.springframework.security.taglibs.authz.AuthorizeTag</tag-class>
+        <description>
+            A simple tag to output or not the body of the tag if the principal
+            has or doesn't have certain authorities.
+        </description>
+
+        <attribute>
+            <name>ifNotGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles which the user must not have
+                for the body to be output.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>ifAllGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles which the user must all
+                possess for the body to be output.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>ifAnyGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles, one of which the user must
+                possess for the body to be output.
+            </description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>authentication</name>
+        <tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
+        <description>
+            Allows access to the current Authentication object.
+        </description>
+
+        <attribute>
+            <name>property</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                Property of the Authentication object which should be output. Supports nested
+                properties. For example if the principal object is an instance of UserDetails,
+                the property "principal.username" will return the username. Alternatively, using
+                "name" will call getName method on the Authentication object directly.
+            </description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Name of the exported scoped variable which will contain the
+                evaluated property of the Authentication object.
+            </description>
+        </attribute>
+        <attribute>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Scope for var.
+            </description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>accesscontrollist</name>
+        <tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
+        <description>
+            Allows inclusion of a tag body if the current Authentication
+            has one of the specified permissions to the presented
+            domain object instance.
+        </description>
+
+        <attribute>
+            <name>hasPermission</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of integers, each representing a
+                required bit mask permission from a subclass of
+                org.springframework.security.acl.basic.AbstractBasicAclEntry.
+            </description>
+        </attribute>
+        <attribute>
+            <name>domainObject</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                The actual domain object instance for which permissions
+                are being evaluated.
+            </description>
+        </attribute>
+    </tag>
+
+</taglib>

BIN
src/main/webapp/assets/images/datacross.png


BIN
src/main/webapp/assets/images/datacross.png.old


BIN
src/main/webapp/assets/images/datacrosslogo.png


BIN
src/main/webapp/assets/images/datacrosslogo.png.old


+ 121 - 0
src/main/webapp/assets/tlds/security.tld

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+        "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+    <tlib-version>1.0</tlib-version>
+    <jsp-version>1.2</jsp-version>
+    <short-name>security</short-name>
+    <uri>http://www.springframework.org/security/tags</uri>
+    <description>
+        Spring Security Authorization Tag Library
+        $Id$
+    </description>
+
+    <tag>
+        <name>authorize</name>
+        <tag-class>org.springframework.security.taglibs.authz.AuthorizeTag</tag-class>
+        <description>
+            A simple tag to output or not the body of the tag if the principal
+            has or doesn't have certain authorities.
+        </description>
+
+        <attribute>
+            <name>ifNotGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles which the user must not have
+                for the body to be output.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>ifAllGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles which the user must all
+                possess for the body to be output.
+            </description>
+        </attribute>
+
+        <attribute>
+            <name>ifAnyGranted</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of roles, one of which the user must
+                possess for the body to be output.
+            </description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>authentication</name>
+        <tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
+        <description>
+            Allows access to the current Authentication object.
+        </description>
+
+        <attribute>
+            <name>property</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                Property of the Authentication object which should be output. Supports nested
+                properties. For example if the principal object is an instance of UserDetails,
+                the property "principal.username" will return the username. Alternatively, using
+                "name" will call getName method on the Authentication object directly.
+            </description>
+        </attribute>
+        <attribute>
+            <name>var</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Name of the exported scoped variable which will contain the
+                evaluated property of the Authentication object.
+            </description>
+        </attribute>
+        <attribute>
+            <name>scope</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+                Scope for var.
+            </description>
+        </attribute>
+    </tag>
+
+    <tag>
+        <name>accesscontrollist</name>
+        <tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
+        <description>
+            Allows inclusion of a tag body if the current Authentication
+            has one of the specified permissions to the presented
+            domain object instance.
+        </description>
+
+        <attribute>
+            <name>hasPermission</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                A comma separated list of integers, each representing a
+                required bit mask permission from a subclass of
+                org.springframework.security.acl.basic.AbstractBasicAclEntry.
+            </description>
+        </attribute>
+        <attribute>
+            <name>domainObject</name>
+            <required>true</required>
+            <rtexprvalue>true</rtexprvalue>
+            <description>
+                The actual domain object instance for which permissions
+                are being evaluated.
+            </description>
+        </attribute>
+    </tag>
+
+</taglib>

+ 3 - 3
src/test/resources/application-unit.properties

@@ -6,9 +6,9 @@ global.encoding=UTF-8
 
 #database setting
 jdbc.driver=com.mysql.jdbc.Driver
-jdbc.username=ssp_test
-jdbc.password=1234qwer
-jdbc.url=jdbc:mysql://122.144.134.135:3306/ssp?useUnicode=true&amp;characterEncoding=UTF-8
+jdbc.username=lyq
+jdbc.password=123456
+jdbc.url=jdbc:mysql://localhost:3306/ssp?useUnicode=true&amp;characterEncoding=UTF-8
 
 #mail server setting
 mail.server=smtp.mediacross.cn