spring-3相关内容
如果会话无效,我想重定向到主页. 我的spring-servlet.xml是
..
我很难在Intellij中设置springframework代码. 我从git克隆了github的springframework项目,并执行了ant任务,将所有库放入ivy-cache目录. 我为intellij项目找到了"spring-framework.ipr"文件,并打开了它. 不幸的是,某些库未正确映射到jar文件或丢失.因此,我无法在IDE中编译代码库. 我还尝试将eclip
..
我无法提交春季表格.我遇到了这种异常,不知道为什么: javax.validation.ConstraintViolationException: validation failed for classes [com.example.my.entities.User] during persist time for groups [javax.validation.groups.Defaul
..
我是春天的新手。我正在使用spring webmvc开发REST api。对于错误处理,我获得了此链接 http://docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-ann-rest-spring-mvc- 我尝试在我的项目中使用ResponseEntityExceptionHandl
..
我正在使用Struts 2休眠弹簧3构建一个应用程序,并以sql作为后端和c3p0连接池(c3p0-0.9.1.1 jar)。 有时,执行查询时,出现以下错误。每当执行查询时,我都会检查连接是否关闭,如果关闭,我将在执行查询之前打开一个新连接。 公共列表 find(final Query query,final Object [] values)抛出HibernateExcep
..
我在验证程序类中自动接线的两个服务有问题.服务正常,因为在我的控制器中是自动接线的.我有一个applicationContext.xml文件和MyApp-servlet.xml文件.我的基本软件包是es.unican.meteo,而软件包es.unican.meteo.validator却有问题.包es.unican.meteo.controller和es.unican.meteo.service
..
我在xml中这样使用beans:profiles:
..
我正在使用Spring 3.2.0.我已经为一些基本需求注册了一些自定义属性编辑器,如下所示. import editors.DateTimeEditor; import editors.StrictNumberFormatEditor; import java.math.RoundingMode; import java.net.URL; import java.text.DecimalF
..
我正在使用AbstractAnnotationConfigDispatcherServletInitializer来配置我的Web应用程序.我还具有用于创建一些bean的@Configuration类.在此类中,我使用@PropertySource批注为各种设置(例如数据库连接详细信息)加载属性文件. 当前,我将Maven配置文件与Ant任务结合使用,以为我的运行时环境创建正确的属性文件.也
..
我正在使用Spring和EhCache 我有以下方法 @Override @Cacheable(value="products", key="#root.target.PRODUCTS") public Set findAll() { return new LinkedHashSet(this.productRepository.findAll()); }
..
我一直在尝试建立一个非常简单的控制器/视图,但无法使其正常工作.在我的web.xml中,我定义了一个名为servlet-context.xml的,它可以正常运行.在servlet-context.xml中,我设置了:
..
从Spring 3.0开始,不建议使用ScheduledTimerTask,我不明白如何升级到org.springframework.scheduling.concurrent.
..
嗨,我正在使用Spring 3.5.0.Release.我想为我的春季休养服务生成一个WADL.它们在Spring中的任何功能是我可以轻松生成WADL的功能. 解决方案 Spring REST并不是像JERSEY这样的开箱即用的WADL生成器,但是完成它应该很容易. https://jira.spring.io/browse/SPR-8705 请参阅Blogpost https
..
如果您不能忍受Maven或任何其他构建管理工具,那么如何下载Spring Framework jar.据我所知,似乎您必须在Google上花费许多令人沮丧的时间,才能找到解决方法.我以为Spring应该很简单.我要做的就是使用Eclipse和Tomcat编写一个简单的Hello World应用程序.为什么在Spring 3中如此困难? 解决方案 去那里 http://repo.spr
..
我仅使用JavaConfig. 我有以下声明: @Bean public static PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); } 根据以下文章,它对于JavaConfig
..
我是Spring MVC的新手,并试图从 springsource 和所有这些都告诉我使用 STS 作为IDE,并选择New Project - Spring Template Project - Spring MVC Project./p> 尽管就我而言,使用3.6.1.R版本的STS,我在那里找不到任何Spring MVC Project选项. 使用STS是否有相同的问题? p.
..
在Spring和Spring Security 3.1中以特定的用户名以编程方式登录Web访问者的正确方法是什么?在2.5以下的情况下,我的处理方式似乎发生了一些变化.我敢肯定,现在有一种更好的方法. 基本上,当我创建一个新用户时,我还需要同时登录它们. 解决方案 创建一个Authentication(通常是UsernamePasswordAuthenticationToken),然
..
我有一个Java配置类,直接通过组件扫描提供fooBean和barBean. @Configuration @ComponentScan(basePackages = { "com.blah" }) public class Config { @Bean public FooBean fooBean { return new FooBean(); }
..
我正在使用Spring的转换服务,并向其注册了自己的转换器: public class MyTypeConverter implements Converter { @Override public Currency convert(String text) { MyType object = new MyType();
..
这是我第一次尝试Spring3的@Scheduled,但是发现我无法提交给DB.这是我的代码: @Service public class ServiceImpl implements Service , Serializable { @Inject private Dao dao; @Override @Scheduled(cron="0 0 * * * ?")
..