fix
Helius
2022-06-23 6da21a3cbc057baaaf882ebc06b4438ddf822ef0
src/main/java/com/xcong/farmer/cms/common/system/controller/LoginController.java
@@ -8,14 +8,19 @@
import com.xcong.farmer.cms.common.system.dto.LoginDto;
import com.xcong.farmer.cms.utils.RedisUtils;
import lombok.extern.slf4j.Slf4j;
import org.jsoup.Jsoup;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.core.Authentication;
import org.springframework.util.ResourceUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -54,4 +59,10 @@
        };
        return Result.ok("success", authInfo);
    }
    @GetMapping("/html")
    public Result html() throws IOException {
        File file = ResourceUtils.getFile("classpath:static/index.html");
        return Result.ok("", Jsoup.parse(file, "utf-8").html());
    }
}