skip to Main Content

Make Redis as optional

I am using spring boot with Redis.Redis is running as Docker container spring.cache.type=redis spring.redis.host=localhost spring.redis.port=6379 Redis is a memory DB, if it finds data in Redis based on the key, it retrieved from Redis otherwise go into actual db call.…

VIEW QUESTION

Redis – Why does ResponseBody and Jackson ObjectMapper don't return the same output?

I am using a Spring Boot application. I have a method in my controller that returns some Resources: @ResponseBody @Transactional(rollbackFor = Exception.class) @GetMapping(value="data/{itemId}/items", produces="application/json") public Resources<DataExcerpt> listMyData(@PathVariable("debateId") UUID debateId)){ List<DataExcerpt> dataExcerpts = dataService .listMyData(id) .stream() .map(d -> this.projectionFactory.createProjection(DataExcerpt.class, d)) .collect(Collectors.toList());…

VIEW QUESTION

Java – Spring security, Shibboleth (apache) and onelogin

The actual Spring Security configuration is like this: @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/uri1/**").hasAuthority(Permission.AUTHORITY1.toString()) .antMatchers("/uri2/**").hasAuthority(Permission.AUTHORITY2.toString()) .anyRequest().hasAuthority(Permission.AUTHORITY3.toString()) .and().httpBasic() .realmName("App").and().csrf().disable(); http.authorizeRequests(); http.headers().frameOptions().sameOrigin().cacheControl().disable(); } @Bean public Filter shallowEtagHeaderFilter() { return new…

VIEW QUESTION
Back To Top
Search