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-
33+ import org . springframework . context . annotation . Profile ;
3434import com .iemr .inventory .data .user .M_User ;
3535
3636@ Configuration
3737@ EnableCaching
38+ @ Profile ("!swagger" )
3839public class RedisConfig {
3940
4041 private @ Value ("${spring.data.redis.host}" ) String redisHost ;
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ spring.datasource.driver-class-name=org.h2.Driver
33spring.jpa.database-platform =org.hibernate.dialect.H2Dialect
44spring.jpa.hibernate.ddl-auto =create-drop
55
6- # Disable Redis if not needed for docs (optional )
6+ # CRITICAL: Disable Spring Session for swagger profile (no Redis )
77spring.session.store-type =none
8- spring.autoconfigure.exclude = org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration,org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
8+
99# CORS for Swagger UI
1010cors.allowed-origins =${CORS_ALLOWED_ORIGINS:http://localhost:9090,http://localhost:8080}
1111# Logging
@@ -18,4 +18,4 @@ jwt.secret=${JWT_SECRET_KEY:#{T(java.util.UUID).randomUUID().toString()}}
1818common-api-url-searchBeneficiary =http://localhost:8080/beneficiary/search
1919
2020# Placeholder for required property
21- common-api-url-searchuserbyid =http://localhost:8080/user/searchbyid
21+ common-api-url-searchuserbyid =http://localhost:8080/user/searchbyid
You can’t perform that action at this time.
0 commit comments