Skip to content

Commit 645a365

Browse files
committed
fix: warnings
1 parent 6bef2d3 commit 645a365

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

backend/src/main/java/ch/xxx/aidoclibchat/adapter/config/SecurityConfig.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.springframework.security.crypto.password.PasswordEncoder;
2424
import org.springframework.security.web.SecurityFilterChain;
2525
import org.springframework.security.web.header.writers.XXssProtectionHeaderWriter.HeaderValue;
26-
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
2726

2827
@Configuration
2928
@EnableWebSecurity
@@ -41,10 +40,10 @@ public SecurityConfig(JwtTokenService jwtTokenService) {
4140
public SecurityFilterChain configure(HttpSecurity http) throws Exception {
4241
// JwtTokenFilter customFilter = new JwtTokenFilter(jwtTokenService);
4342
HttpSecurity httpSecurity = http
44-
.authorizeHttpRequests(authorize -> authorize.requestMatchers(AntPathRequestMatcher.antMatcher("/rest/auth/**")).permitAll()
45-
// .requestMatchers(AntPathRequestMatcher.antMatcher("/rest/**")).authenticated()
46-
.requestMatchers(AntPathRequestMatcher.antMatcher("/rest/**")).permitAll()
47-
.requestMatchers(AntPathRequestMatcher.antMatcher("/**")).permitAll())
43+
.authorizeHttpRequests(authorize -> authorize.requestMatchers("/rest/auth/**").permitAll()
44+
// .requestMatchers("/rest/**").authenticated()
45+
.requestMatchers("/rest/**").permitAll()
46+
.requestMatchers("/**").permitAll())
4847
.csrf(myCsrf -> myCsrf.disable())
4948
.sessionManagement(mySm -> mySm.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
5049
.headers(myHeaders -> myHeaders.xssProtection(myXss -> myXss.headerValue(HeaderValue.ENABLED)))

backend/src/main/java/ch/xxx/aidoclibchat/usecase/service/ImageService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
@Transactional
5353
public class ImageService {
5454
private static final Logger LOG = LoggerFactory.getLogger(ImageService.class);
55-
private ChatClient chatClient;
56-
private ImageRepository imageRepository;
57-
private DocumentVsRepository documentVsRepository;
55+
private final ChatClient chatClient;
56+
private final ImageRepository imageRepository;
57+
private final DocumentVsRepository documentVsRepository;
5858
@Value("${image.result-size:20}")
5959
private Long resultSize;
6060
//private final String systemPrompt = "You are a helpful assistent searching image descriptions.";

0 commit comments

Comments
 (0)