diff --git a/SC-boot/linkage-common/pom.xml b/SC-boot/linkage-common/pom.xml index 4d14bc16..8246bed1 100644 --- a/SC-boot/linkage-common/pom.xml +++ b/SC-boot/linkage-common/pom.xml @@ -130,24 +130,24 @@ sqljdbc4 ${sqlserver.version} --> - - com.oracle.database.jdbc - ojdbc8 - - - com.oracle.database.nls - orai18n - - - - com.dm - DmJdbcDriver18 - - - - com.kingbase8 - kingbase8-jdbc - + + + + + + + + + + + + + + + + + + org.postgresql diff --git a/SC-boot/linkage-oauth/src/main/java/jnpf/config/SecurityConfig.java b/SC-boot/linkage-oauth/src/main/java/jnpf/config/SecurityConfig.java index 8d4b1215..294be1e1 100644 --- a/SC-boot/linkage-oauth/src/main/java/jnpf/config/SecurityConfig.java +++ b/SC-boot/linkage-oauth/src/main/java/jnpf/config/SecurityConfig.java @@ -10,9 +10,6 @@ import org.springframework.security.config.annotation.authentication.builders.Au import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * @@ -23,23 +20,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; */ @Configuration @EnableWebSecurity -public class SecurityConfig extends WebSecurityConfigurerAdapter implements WebMvcConfigurer { +public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired - //private UserDetailsServiceImpl userDetailsService; - private UserDetailsService userDetailsService; + private UserDetailsServiceImpl userDetailsService; @Autowired private MyPasswordEncoder passwordEncoder; - private static final String[] URL_WHITELIST = { - "/favicon.ico", - "/webjars/**", - "/img.icons/**", - "/swagger-resources/**", - "/v3/api-docs/**", - "/swagger-ui/**", - "/doc.html", - }; /** * 配置请求路径 @@ -52,29 +39,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter implements WebM http.headers().frameOptions().disable(); http.csrf().disable().authorizeRequests() .antMatchers("/RSA/publicKey").permitAll() - .antMatchers("/jmreport/**").anonymous() - // 配置拦截规则 - .and() - .authorizeRequests() - .antMatchers(URL_WHITELIST).permitAll() - .anyRequest().authenticated(); - } - @Bean - @Override - public AuthenticationManager authenticationManagerBean() throws Exception { - return super.authenticationManagerBean(); - } - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry.addResourceHandler("/**").addResourceLocations( - "classpath:/static/"); - registry.addResourceHandler("swagger-ui.html") - .addResourceLocations("classpath:/META-INF/resources/"); + .antMatchers("/jmreport/**").anonymous(); - registry.addResourceHandler("/webjars/**") - .addResourceLocations("classpath:/META-INF/resources/webjars/"); - registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/"); } /**