본문 바로가기

업무

제우스에 스프링부트 / 리액트 소스 반영 시

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 삭제