spring2.x

How can I test an old Spring 2.0.7 application with JUnit?

给你一囗甜甜゛ 提交于 2019-12-24 20:21:39
问题 I have an old app built with an ancient version of Spring: 2.0.7. I have been tasked with adding new functionality to this app, so I'm required to write some JUnit tests too. So far, I have writen mockup classes for my services, and an applicationContext-test.xml file placed under src/test/resources/ . Typically, the next step would be to write my test case like this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"/applicationContext-test.xml"}) public class

Spring 2.0.x Jersey 2 Request scoped bean

不羁岁月 提交于 2019-12-24 15:22:39
问题 I m working with a legacy spring 2.0.6 project integrated with jersey 2.x. The application context contains some beans like: <!-- - Application context definition --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema

Spring boot 2 @Query named parameter binding value resolution messes up after upgrade from 1.5

江枫思渺然 提交于 2019-12-02 09:47:58
问题 We have the following working query using SpringBoot 1.5: @Query(value = "SELECT DISTINCT c FROM Customer c INNER JOIN c.industry i WHERE " + "c.role IN :roleFilter " + "AND (:#{#industryFilter.size()} = 1 OR i.id IN :industryFilter) " + "AND (:searchString IS NULL " + "OR CONCAT_WS(' ', c.name, c.name2) LIKE CONCAT('%', :searchString, '%') " + "OR CONCAT_WS(' ', c.name2, c.name) LIKE CONCAT('%', :searchString, '%')) " + "AND (:includeDeleted = true OR c.deletedDate is NULL)", countQuery =