spring-data

Spring data and junit

不羁的心 提交于 2020-01-17 09:56:10
问题 i have a problem where i want to test spring data with junit. I use spring data jpa with junit 4 : this is my test class @ContextConfiguration(locations={"classpath*:applicationContext.xml"}) @Transactional @RunWith(SpringJUnit4ClassRunner.class) public class EquipementServiceTest1 { @Autowired

Spring data and junit

这一生的挚爱 提交于 2020-01-17 09:49:06
问题 i have a problem where i want to test spring data with junit. I use spring data jpa with junit 4 : this is my test class @ContextConfiguration(locations={"classpath*:applicationContext.xml"}) @Transactional @RunWith(SpringJUnit4ClassRunner.class) public class EquipementServiceTest1 { @Autowired

Spring Boot, Thymeleaf Form Error

ⅰ亾dé卋堺 提交于 2020-01-17 09:16:05
问题 I am trying to create a task creation page. There is a form where the user can enter the name, description and task status and save it. However, when I go to the page it shows me this error There was an unexpected error (type=Internal Server Error, status=500). Error during execution of processor

Display data from related entities to avoid the lazy initialization exception with setting up @BatchSize

孤街醉人 提交于 2020-01-17 08:11:14
问题 I have Entity like that @Entity @Table(...) public class ENTITY_1 { //.... private ENTITY_2 entity_2 ; private ENTITY_3 entity_3 ; private Set<ENTITY_3> entities_3 = new HashSet<ENTITY_3>(0); ; private ENTITY_4 entities_4 = new HashSet<ENTITY_4>(0); ; //... and i want to display a result of a

spring-data-redis with @Cachable & @Query gives a java.io.NotSerializableException on DefaultMethodInvokingMethodInterceptor

筅森魡賤 提交于 2020-01-17 07:14:11
问题 When using redis as a cache and @Query on a repository method, redis JdkSerializationRedisSerializer , is unable to serialize a projection. Put a github project with tests; https://github.com/varunmehta/spring-cache-error Actual Entity @Entity public class User { @Id private Integer id; private

Spring Data JPA Transaction - No Transaction in progress - Spring Data Neo4j

♀尐吖头ヾ 提交于 2020-01-17 01:58:10
问题 I think i'm missing something obvious. Iam trying to make a entity persist into a database via a JUnit Test case, however it doesnt seem to be persisting due to no active transaction. Configuration: @Configuration @EnableTransactionManagement public class TransactionConfig { @Inject private

Regular & Spring Data based cache operations fail with CacheStoppedException post manual reconnect with clientReconnectDisabled as true

筅森魡賤 提交于 2020-01-17 01:44:07
问题 We are running version 2.4 & using Spring IgniteSpringBean & Spring Data repositories for cluster & cache access. Since we have been having a lot of IgniteClientDisconnectedException related issues, i am writing a manual segmentation resolver (by disabling automatic client reconnection with