application.java class에 @Override 추가
package kr.muhanit.sfps;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
@EnableCaching
@SpringBootApplication
public class SfpsApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(SfpsApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(SfpsApplication.class, args);
}
}
SecurityConfig.java에 @EnableWebSecurity 어노테이션 추가
package kr.muhanit.sfps.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.crypto.password.DelegatingPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import java.util.HashMap;
import java.util.Map;
@EnableWebSecurity
@Configuration
public class SecurityConfig {
@Bean
public PasswordEncoder passwordEncoder() {
// return new BCryptPasswordEncoder();
String encodingId = "SHA-256";
Map<String, PasswordEncoder> encoders = new HashMap<>();
encoders.put("SHA-256", new org.springframework.security.crypto.password.MessageDigestPasswordEncoder("SHA-256"));
return new DelegatingPasswordEncoder(encodingId, encoders);
}
}
그 후 WEB-INF / lib 폴더에서
- embaded -tomcat 관련 삭제(tomcat-embed-core-9.0.65 , tomcat-embed-el-9.0.65, tomcat-embed-websocket-9.0.65)
- jboss-logging-3.4.3.Final 삭제
- classmate-1.5.1 삭제
- hibernate-validator-6.2.4.Final 삭제
'업무' 카테고리의 다른 글
우분투 , RockyOS postgresql db 이관하기 (0) | 2024.03.18 |
---|---|
geoserver 좌표계 오류 ( EPSG found for object of type ) NoSuchAuthorityCodeException (0) | 2023.11.02 |
1 (0) | 2022.11.14 |