spring-4相关内容
这是我的BeanNameAutoProxyCreator: @Bean public BeanNameAutoProxyCreator beanNameAutoProxyCreator() { BeanNameAutoProxyCreator beanNameAutoProxyCreator = new BeanNameAutoProxyCreator(); beanName
..
我已经为我的实体Employee配置了组合主键,如下所示: Employee.java: @Entity @Table(name="employee") @Proxy(lazy=false) @IdClass(EmployeeId.class) public class Employee implements Serializable { private static fina
..
我有一个受Spring安全性保护的Spring MVC RESTful应用程序.客户端是Angular JS. 但是我的登录和注销页面都是纯jsp,我基于表单进行登录和注销.成功进行完全身份验证后,我将加载我的安全页面(它使用anlgularJS和RESTful API). 我需要帮助来处理AuthenticationException&调用REST api时出现AccessDeniedEx
..
我需要对用户目标订阅作出反应. 示例: 用户订阅/user/messages,因为他想接收所有传入的消息.现在,我想查找该用户离线时创建的该用户的所有消息,然后将其发送给该用户. 工作代码: 客户代码: stompClient.subscribe('/user/messages', function(msg){ alert(msg.body); }); 服
..
我想在springs新的websocket/stomp支持下进行小型聊天. 我想我不能使用这样的东西: @MessageMapping("/connect/{roomId}") @SendTo("/topic/newMessage") public String connectToChatRoom(@PathVariable String roomId, Principal p) {
..
我已经检查了这个问题,但是经过4个小时的尝试,我没有任何反应. 尝试访问css文件时收到405错误.这是我的Config.java package com.myapp.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Com
..
我仅使用JavaConfig. 我有以下声明: @Bean public static PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); } 根据以下文章,它对于JavaConfig
..
我正在使用SpringBoot处理Spring 4应用程序. 在com.test.tm程序包中, 应用类别: @SpringBootApplication @EnableJpaRepositories( repositoryFactoryBeanClass = GenericRepositoryFactoryBean.class ) @Import( { HikariDat
..
我正在使用spring加载属性文件
..
我正在尝试让Ehcache 3在不使用Spring引导的情况下与Spring 4一起使用. 此处是一个使用Spring Boot的有效示例,但是我正在开发一个不使用Spring Boot的现有应用程序. 问题在于spring-context-support(添加了Spring的缓存注释)希望Ehcache的CacheManager处于以下类路径中:net.sf.ehcache.Cach
..
在一个很好的答案中 https://stackoverflow.com/a/27161986/4358405 有一个示例使用不带STOMP子协议(也可能不带SockJS)的原始Spring4 WebSockets. 现在我的问题是:如何向所有客户广播?我期望看到一个可以与纯JSR 356 websockets API类似使用的API:session.getBasicRemote().send
..
自启动以来,我一直对如何处理InterruptedException以及如果花费太多时间如何正确取消http请求感到困惑.我有一个库,其中为我们的客户提供了两种方法,sync和async.他们可以调用他们认为适合自己目的的任何方法. executeSync()-等待直到得到结果,然后返回结果. executeAsync()-立即返回一个Future,如果需要,可以在完成其他操作后对其进行处
..
我设法用Spring 4和Stomp创建了简单的Websocket应用程序.在此处查看我的最后一个问题. 然后,我尝试使用远程消息代理(ActiveMQ).我刚刚启动经纪人并更改了 registry.enableSimpleBroker("/topic"); 到 registry.enableStompBrokerRelay("/topic"); 成功了. 问题是如何配置
..
默认情况下,spring bean是单例的.我想知道是否有一种方法可以获取同一bean的多个实例进行处理. 这是我目前正在做的 @Configuration public class ApplicationMain { @Value("${service.num: not configured}") private int num; //
..
我使用, Spring Framework 4.0.0 RELEASE(GA) Spring Security 3.2.0 RELEASE(GA) Struts 2.3.16 我在其中使用 org.springframework.security.authentication.dao.DaoAuthenticationProvider 用于身份验证.我的spring-se
..
我正在使用Spring 4.0.7 我对通过JavaConfig配置Spring MVC进行了研究. 实际上直到昨天,我已经看到了使用这两个选项的两种配置 扩展了AbstractAnnotationConfigDispatcherServletInitializer 扩展了WebMvcConfigurerAdapter ,并实现了WebApplicationInitialize
..
我正在使用Spring 4.0.7 关于Spring MVC,出于研究目的,我有以下内容: @RequestMapping(value="/getjsonperson", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE) publi
..
在Tomcat 6.0.37中部署Spring 4.0.1应用程序时,我遇到了以下异常情况: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springfram
..
我正在使用Spring Framework 4.0.7,MVC和Rest 我可以和平相处: @Controller ResponseEntity 例如: @Controller @RequestMapping("/person") @Profile("responseentity") public class PersonRestResponseEntityCont
..
我正在尝试了解此处的区别.我看到一个类都使用相同的包示例进行了注释: @Configuration @EntityScan("some.known.persistence") @ComponentScan({ "some.known.persistence"}) public class ApiConfig { } 我了解与API文档的区别,但希望详细了解.这是否也意味着通过@Comp
..