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
public class KeyLoader { | |
private static ECPrivateKey loadPrivateKey() throws NoSuchAlgorithmException, InvalidKeySpecException { | |
// generate key: openssl ecparam -genkey -name secp521r1 -noout -out private_key.pem | |
// parse key: openssl pkcs8 -topk8 -in .\private_key.pem -out pkcs8_rsa_private_key.pem -nocrypt | |
var privateKey = "key string"; | |
var keyBytes = Base64.getDecoder().decode(privateKey); | |
var spec = new PKCS8EncodedKeySpec(keyBytes); | |
var kf = KeyFactory.getInstance("EC"); | |
var key = kf.generatePrivate(spec); | |
if (key instanceof ECPrivateKey pk) { |
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"?> | |
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd"> | |
<!-- localRepository | |
| The path to the local repository maven will use to store artifacts. | |
| | |
| Default: ${user.home}/.m2/repository | |
<localRepository>/path/to/local/repo</localRepository> | |
--> |
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
#write .CodeMirror-wrap .CodeMirror-code pre { | |
font-family: MonoLisa, Menlo, 'Cascadia Code', Consolas; | |
} | |
.md-fences, | |
code, | |
tt { | |
font-family: MonoLisa, Menlo, 'Cascadia Code', Consolas; | |
} |
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
allprojects { | |
repositories { | |
mavenLocal() | |
maven("https://maven.proxy.ustclug.org/maven2/") | |
maven("https://maven.aliyun.com/repository/public/") | |
mavenCentral() | |
} | |
} |
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
printWidth: 80 | |
tabWidth: 2 | |
useTabs: false | |
semi: false | |
singleQuote: false | |
quoteProps: as-needed | |
jsxSingleQuote: false | |
trailingComma: es5 | |
bracketSpacing: true | |
bracketSameLine: true |
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"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> | |
<context:component-scan base-package="cn.vorbote.demo" use-default-filters="false"> | |
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> | |
</context:component-scan> |
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"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:mvc="http://www.springframework.org/schema/mvc" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd | |
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> |
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"?> | |
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" | |
version="4.0"> | |
<context-param> | |
<param-name>contextConfigLocation</param-name> | |
<param-value>classpath:container.xml</param-value> | |
</context-param> |
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> | |
<property name="COLOURFUL_OUTPUT" value="%black(%date{'dd MMM, yyyy HH:mm:ss', Asia/Hong_Kong, en-UK}) %highlight(%-5level) %black(---) %black([%10.10t]) %cyan(%-20.20logger{20}) %black(:) %msg%n"/> | |
<property name="STANDARD_OUTPUT" value="%date{'dd MMM, yyyy HH:mm:ss', Asia/Hong_Kong, en-UK} %-5level %black(---) [%10.10t] %-20.20logger{20} : %msg%n"/> | |
<statusListener class="ch.qos.logback.core.status.NopStatusListener" /> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> | |
<pattern>${COLOURFUL_OUTPUT}</pattern> | |
</encoder> |