File tree Expand file tree Collapse file tree
java/com/iemr/inventory/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030import org .springframework .data .redis .core .RedisTemplate ;
3131import org .springframework .data .redis .serializer .Jackson2JsonRedisSerializer ;
3232import org .springframework .data .redis .serializer .StringRedisSerializer ;
33- import org .springframework .context .annotation .Profile ;
3433import com .iemr .inventory .data .user .M_User ;
3534
3635@ Configuration
3736@ EnableCaching
38- @ Profile ("!swagger" )
3937public class RedisConfig {
4038
4139 private @ Value ("${spring.data.redis.host}" ) String redisHost ;
@@ -47,7 +45,6 @@ LettuceConnectionFactory lettuceConnectionFactory() {
4745 }
4846
4947 @ Bean
50- @ Profile ("!swagger" )
5148 public RedisTemplate <String , M_User > redisTemplate (RedisConnectionFactory factory ) {
5249 RedisTemplate <String , M_User > template = new RedisTemplate <>();
5350 template .setConnectionFactory (factory );
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
44spring.jpa.hibernate.ddl-auto =create-drop
55
66# CRITICAL: Disable Spring Session for swagger profile (no Redis)
7- spring.session.store-type =none
7+
8+ spring.data.redis.host = ${HOST:localhost}
9+ spring.data.redis.port = ${PORT:6379}
810
911# CORS for Swagger UI
1012cors.allowed-origins =${CORS_ALLOWED_ORIGINS:http://localhost:9090,http://localhost:8080}
You can’t perform that action at this time.
0 commit comments