Fixed spring-session integration tests (#4650)
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
3b7cb37379
commit
28166a73de
+16
-5
@@ -1,14 +1,18 @@
|
||||
package com.baeldung.spring.data.dynamodb.config;
|
||||
|
||||
import org.socialsignin.spring.data.dynamodb.repository.config.EnableDynamoDBRepositories;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentials;
|
||||
import com.amazonaws.auth.BasicAWSCredentials;
|
||||
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
|
||||
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;
|
||||
import org.socialsignin.spring.data.dynamodb.repository.config.EnableDynamoDBRepositories;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Configuration
|
||||
@EnableDynamoDBRepositories(basePackages = "com.baeldung.spring.data.dynamodb.repositories")
|
||||
@@ -22,6 +26,9 @@ public class DynamoDBConfig {
|
||||
|
||||
@Value("${amazon.aws.secretkey}")
|
||||
private String amazonAWSSecretKey;
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext context;
|
||||
|
||||
@Bean
|
||||
public AmazonDynamoDB amazonDynamoDB() {
|
||||
@@ -37,4 +44,8 @@ public class DynamoDBConfig {
|
||||
return new BasicAWSCredentials(amazonAWSAccessKey, amazonAWSSecretKey);
|
||||
}
|
||||
|
||||
@Bean(name = "mvcHandlerMappingIntrospector")
|
||||
public HandlerMappingIntrospector mvcHandlerMappingIntrospector() {
|
||||
return new HandlerMappingIntrospector(context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user