- 浏览: 250999 次
- 性别:
- 来自: 西安
最新评论
-
jobsccnu:
非常感谢,到处找这个代码呢
flex导出图片 -
li1045460568:
...
HibernateDao.java -
li1045460568:
[flash=200,200][flash=200,200][ ...
HibernateDao.java -
zz210891470:
会报这个错啊Exception in thread " ...
cxf webService简单例子 -
jie66989:
主要就是这个类了,这是前段时间学习的时候用的一部分,那个时候只 ...
HibernateDao.java
文章列表
在自己实现的FilterInvocationSecurityMetadataSource接口的子类中的
getAttributes(Object arg0)方法里
javax.servlet.http.HttpServletRequest
request = ((org.springframework.security.web.FilterInvocation
)arg0).getRequest();
可以获得request对象
org.springframework.security.core.Authentication
auth = org.springframework.secur ...
注解配置中给对应的bean添加org.springframework.context.annotation.Scope注解
//@Scope("singleton") // 容器范围
//@Scope("prototype") //每次获取bean都new
//@Scope("request") //一次http请求一个实例
//@Scope("session") //一个http session中
//@Scope("globalSession")// 一个全局session中有效
//@Sc ...
spring security3.1
不包含jar包,需要的可以在www.findjar.com中找
在eclipse/myeclipse中,当添加注释的作者选项时,@author 后边一般都会默认填充的你登录计算机的用户名。
如何去修改呢:
第一种方法:修改计算机登录的用户名(一般不实用)
第二种方法:修改Preference其中 @author 的属性,并写入你所要用的 ;步骤如下:
通过菜单 Window->Preference 打开参数设置面板,然后选择:Java -> Code Style -> Code Templates ,在右侧选择Comments,将其中的Types项,然后选右边的"Edit",进入编辑模式,将 @author ${user ...
web.xml中添加security过滤器
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFi ...
ss3h项目jar
- 博客分类:
- spring security3
ss3h项目的部分jar包
这里很容易找到jar
http://www.findjar.com
另外jar的位置和笔记:
http://jie66989.iteye.com/blog/1704654
cxf发布webservice简单例子:
cxf最小依赖的jar:
cxf-2.2.6.jar
jetty-6.1.21.jar
jetty-util-6.1.21.jar
wsdl4j-1.6.2.jar
XmlSchema-1.4.5.jar
附件中为以上jar
接口类:
import javax.jws.WebService;
@WebService
public interface IHelloWorld {
String sayHello();
}
实现类:
import javax.jws.WebService;
//@WebService(end ...
web.xml配置spring mvc的servlet
<!-- 配置spring mvc的相关内容,此处的servlet-name任意,但必须有<your servlet-name>-servlet.xml与之对应 -->
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
...
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLConnection;
/**
* 使用URLConnection下载文件或图片并保存到本地。
*/
public class URLConnectionDownloader {
public static void main(String[] args) throws Exception ...
下载图片并保存到本地
- 博客分类:
- java
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import ...
参考博文地址:http://blog.csdn.net/hnzhangshilong/article/details/6689675
注意:有时候测试的时候,明明加了缓存了,但是就是缓存不成功,这时候需要注意,对应dao是怎么获得的,是否为一个实例,如果每次都是新new一个对象也会出现缓存不成功。
http://bbs.csdn.net/topics/320180848
使用ehcache配置hibernate缓存策略
实体bean注解配置:
@Entity
@Table(name = "consumer", catalog = "cdr_busines&quo ...
junit3
就加载junit3对应的jar包就可以
测试类需要继承junit.framework.TestCase
重写setup方法在setup加载需要的配置文件
测试方法需要以test开头testMyCase()
junit4
依赖的jar:org.hamcrest.core.jar junit4.jar
只需要测试方法加org.junit.Test注解
或者按照3的规范继承junit.framework.TestCase并规范命名测试方法即可
和spring的整合
参考:http://blog.csdn.net/mumuzhu2011/article/details/7704 ...
分配置文件在classpath下和web-inf下两种情况的加载:
ApplicationContext context = new FileSystemXmlApplicationContext("WebRoot/WEB-INF/applicationContext.xml");
new ClassPathXmlApplicationContext("applicationContext.xml");// 从classpath中加载
new FileSystemXmlApplicationContext("classpath:地址" ...
myeclipse迁出项目后,不能部署到web容器上的问题,是由于prj_home_dir\.mymetadata中的j2ee-spec="1.4"的原因,改为5.0重启myeclipse即可
迁出项目后没有java ee 5 libraries是由于prj_home_dir\.classpath中没有<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
加上后刷 ...
在catalog中添加一个服务器管理
打开catalog点击GIS Servers 添加一个服务Add ArcGIS Server
选择manage GIS Services下一步Server URL的类型如http://ddchserver:8399/arcgis/services
其中ddchserver为gisserve服务器名称或者ip地址都可以
下面hostName填写服务器 ...