skip to Main Content

Redis – Bean is created regardless of @ConditionalOnProperty matchIfMissing's value

I am trying to create a bean for cacheManager only when a specific cachemanager is not configured. @Bean @ConditionalOnProperty(name = "spring.cache.type", matchIfMissing = true) public CacheManager cacheManager() { ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager() { @Override protected Cache createConcurrentMapCache(final String name)…

VIEW QUESTION

XMLHttpRequest blocked by CORS policy annotation @CrossOrigin – Nginx

Access to XMLHttpRequest at 'http://localhost:8080/api/auth/signup' from origin 'https://mysuite.ru' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request. http.cors().and() .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() .authorizeRequests() .antMatchers("/admin").hasRole("ADMIN") .antMatchers("/").permitAll() .antMatchers("/favicon.ico").permitAll() .antMatchers("/static/**").permitAll() .antMatchers("/manifest.json").permitAll()…

VIEW QUESTION

Redis – ClassNotFoundException while JedisClient initialization in Spring Boot 2.5.4 application

I have a Spring Boot 2.5.4 application in which I would like to add Redis and access it via Spring Data Redis. My current configuration looks like this: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId>…

VIEW QUESTION
Back To Top
Search