This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="WARN" monitorInterval="30"> | |
<Properties> | |
<Property name="APP_NAME" value="webtools"/> | |
<Property name="LOG_PATH" value="/mnt/c/Files/Logs/Mine/webtools"/> | |
<Property name="LAYOUT" value="%style{%d{yyyy-MM-dd HH:mm:ss.SSS}}{Cyan} [%-26.26t] %5level %style{[%40.-40c{1.}:%-3.5L]}{Magenta} %m%n"/> | |
</Properties> | |
<Appenders> | |
<Console name="Console" target="SYSTEM_OUT"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(100|(([1-9])[0-9]?|0{1})((\.)([0-9]){1,2})?)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val authUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECTURI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect" | |
private val appId = "xxxxxxx" | |
private val redirectUrl = "http://www.xxx.com/xxx/redirectBack" | |
@GetMapping("/getCode") | |
fun redirect(url: String, scope: String, response: HttpServletResponse) { | |
println(url) | |
val encodeUrl = encode(url, StandardCharsets.UTF_8) | |
val redirectUrl: String = authUrl | |
.replace("APPID", appId) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="file" type="file"/> | |
<script> | |
let input = document.getElementById("file"); | |
input.addEventListener("change", function () { | |
if (this.files && this.files[0]) { | |
let myFile = this.files[0]; | |
let reader = new FileReader(); | |
reader.addEventListener('load', function (e) { | |
console.log(e.target.result); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val OAUTH2_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECTURI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect" | |
val appId = "xxxx" | |
/** | |
* 认证 | |
* @param url 回跳链接 | |
* @param scope 授权方式 | |
*/ | |
@GetMapping("/getCode") | |
fun redirect(url: String, scope: String, response: HttpServletResponse) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class GlobalCorsConfig { | |
@Bean | |
public FilterRegistrationBean corsFilter() { | |
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); | |
CorsConfiguration config = new CorsConfiguration(); | |
config.setAllowCredentials(true); | |
// 设置你要允许的网站域名,如果全允许则设为 * | |
config.addAllowedOrigin("*"); | |
// 如果要限制 HEADER 或 METHOD 请自行更改 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* http form 请求工具类 | |
*/ | |
public class HttpFormUtil { | |
private static final Logger LOGGER = LoggerFactory.getLogger(HttpFormUtil.class); | |
/** | |
* multipart/form-data 格式发送数据时各个部分分隔符的前缀,必须为 -- | |
*/ | |
private static final String BOUNDARY_PREFIX = "--"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static { | |
String proxyHost = "127.0.0.1"; | |
String proxyPort = "1080"; | |
System.setProperty("http.proxyHost", proxyHost); | |
System.setProperty("http.proxyPort", proxyPort); | |
System.setProperty("https.proxyHost", proxyHost); | |
System.setProperty("https.proxyPort", proxyPort); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name * 搜狗/百度/谷歌翻译 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author OnySakura | |
// @include * | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<configuration> | |
<archive> | |
<manifest> | |
<addClasspath>true</addClasspath> | |
<classpathPrefix>lib/</classpathPrefix> | |
<!--此处修改为你的应用入口类全路径--> | |
<mainClass>com.xxx.xxxxx.Application</mainClass> |
NewerOlder