| | |
| | | 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; |
| | | |
| | |
| | | }; |
| | | 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()); |
| | | } |
| | | } |