@Autowired
protected void configureGlobal(AuthenticationManagerBuilder auth)
throws Exception {
auth.userDetailsService(userService).passwordEncoder(userService.bCryptPasswordEncoder());
}
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
public class Example {
public static void main(String args[]) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MMMM-yyyy HH:mm");
LocalDateTime localDateTime = LocalDateTime.parse("06.12.2021 23:43", formatter);
}
}
javac Example.java
java Example
Exception in thread "main" java.time.format.DateTimeParseException: Text '06.12.2021 23:43' could not be parsed at index 2
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
at java.time.LocalDateTime.parse(LocalDateTime.java:492)
$data = @{
'username' = $env:USERNAME;
'pid' = $processid;
'parent' = $parentprocessname;
'message' = 'test';
'invoked' = $date;
}
...
out-file -encoding ascii -filepath 'result.txt' -append -InputObject $data
@Bean
public PasswordEncoder bCryptPasswordEncoder() {
return new BCryptPasswordEncoder();
}
src/main/java/example/demo/config/WebSecurityConfiguration.java
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Launcher {
public static void main(String[] args) {
SpringApplication.run(Launcher.class, args);
}
}
target\demo-0.0.1-SNAPSHOT.jar
META-INF/
META-INF/MANIFEST.MF
org/
org/springframework/
org/springframework/boot/
org/springframework/boot/loader/
org/springframework/boot/loader/ClassPathIndexFile.class
org/springframework/boot/loader/ExecutableArchiveLauncher.class
org/springframework/boot/loader/JarLauncher.class
org/springframework/boot/loader/LaunchedURLClassLoader$DefinePackageCallType.class
org/springframework/boot/loader/LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.class
org/springframework/boot/loader/LaunchedURLClassLoader.class
org/springframework/boot/loader/Launcher.class
org/springframework/boot/loader/MainMethodRunner.class
org/springframework/boot/loader/PropertiesLauncher$1.class
org/springframework/boot/loader/PropertiesLauncher$ArchiveEntryFilter.class
org/springframework/boot/loader/PropertiesLauncher$ClassPathArchives.class
org/springframework/boot/loader/PropertiesLauncher$PrefixMatchingArchiveFilter.class
org/springframework/boot/loader/PropertiesLauncher.class
org/springframework/boot/loader/WarLauncher.class
org/springframework/boot/loader/archive/
org/springframework/boot/loader/archive/Archive$Entry.class
org/springframework/boot/loader/archive/Archive$EntryFilter.class
org/springframework/boot/loader/archive/Archive.class
org/springframework/boot/loader/archive/ExplodedArchive$AbstractIterator.class
org/springframework/boot/loader/archive/ExplodedArchive$ArchiveIterator.class
org/springframework/boot/loader/archive/ExplodedArchive$EntryIterator.class
org/springframework/boot/loader/archive/ExplodedArchive$FileEntry.class
org/springframework/boot/loader/archive/ExplodedArchive$SimpleJarFileArchive.class
org/springframework/boot/loader/archive/ExplodedArchive.class
org/springframework/boot/loader/archive/JarFileArchive$AbstractIterator.class
org/springframework/boot/loader/archive/JarFileArchive$EntryIterator.class
org/springframework/boot/loader/archive/JarFileArchive$JarFileEntry.class
org/springframework/boot/loader/archive/JarFileArchive$NestedArchiveIterator.class
org/springframework/boot/loader/archive/JarFileArchive.class
org/springframework/boot/loader/data/
org/springframework/boot/loader/data/RandomAccessData.class
org/springframework/boot/loader/data/RandomAccessDataFile$1.class
org/springframework/boot/loader/data/RandomAccessDataFile$DataInputStream.class
org/springframework/boot/loader/data/RandomAccessDataFile$FileAccess.class
org/springframework/boot/loader/data/RandomAccessDataFile.class
org/springframework/boot/loader/jar/
org/springframework/boot/loader/jar/AbstractJarFile$JarFileType.class
org/springframework/boot/loader/jar/AbstractJarFile.class
org/springframework/boot/loader/jar/AsciiBytes.class
org/springframework/boot/loader/jar/Bytes.class
org/springframework/boot/loader/jar/CentralDirectoryEndRecord$1.class
org/springframework/boot/loader/jar/CentralDirectoryEndRecord$Zip64End.class
org/springframework/boot/loader/jar/CentralDirectoryEndRecord$Zip64Locator.class
org/springframework/boot/loader/jar/CentralDirectoryEndRecord.class
org/springframework/boot/loader/jar/CentralDirectoryFileHeader.class
org/springframework/boot/loader/jar/CentralDirectoryParser.class
org/springframework/boot/loader/jar/CentralDirectoryVisitor.class
org/springframework/boot/loader/jar/FileHeader.class
org/springframework/boot/loader/jar/Handler.class
org/springframework/boot/loader/jar/JarEntry.class
org/springframework/boot/loader/jar/JarEntryCertification.class
org/springframework/boot/loader/jar/JarEntryFilter.class
org/springframework/boot/loader/jar/JarFile$1.class
org/springframework/boot/loader/jar/JarFile$JarEntryEnumeration.class
org/springframework/boot/loader/jar/JarFile.class
org/springframework/boot/loader/jar/JarFileEntries$1.class
org/springframework/boot/loader/jar/JarFileEntries$EntryIterator.class
org/springframework/boot/loader/jar/JarFileEntries.class
org/springframework/boot/loader/jar/JarFileWrapper.class
org/springframework/boot/loader/jar/JarURLConnection$1.class
org/springframework/boot/loader/jar/JarURLConnection$JarEntryName.class
org/springframework/boot/loader/jar/JarURLConnection.class
org/springframework/boot/loader/jar/StringSequence.class
org/springframework/boot/loader/jar/ZipInflaterInputStream.class
org/springframework/boot/loader/jarmode/
org/springframework/boot/loader/jarmode/JarMode.class
org/springframework/boot/loader/jarmode/JarModeLauncher.class
org/springframework/boot/loader/jarmode/TestJarMode.class
org/springframework/boot/loader/util/
org/springframework/boot/loader/util/SystemPropertyUtils.class
BOOT-INF/
BOOT-INF/classes/
BOOT-INF/classes/com/
BOOT-INF/classes/com/example/
BOOT-INF/classes/com/example/demo/
BOOT-INF/classes/com/example/demo/config/
BOOT-INF/classes/com/example/demo/controller/
BOOT-INF/classes/com/example/demo/dto/
BOOT-INF/classes/com/example/demo/entity/
BOOT-INF/classes/com/example/demo/repository/
BOOT-INF/classes/com/example/demo/service/
META-INF/maven/
META-INF/maven/com.example/
META-INF/maven/com.example/demo/
BOOT-INF/classes/application.properties
BOOT-INF/classes/com/example/demo/config/AppConfig.class
BOOT-INF/classes/com/example/demo/config/WebSecurityConfig.class
BOOT-INF/classes/com/example/demo/controller/RegistrationController.class
BOOT-INF/classes/com/example/demo/dto/UserDTO.class
BOOT-INF/classes/com/example/demo/entity/Role.class
BOOT-INF/classes/com/example/demo/entity/User.class
BOOT-INF/classes/com/example/demo/Launcher.class
BOOT-INF/classes/com/example/demo/repository/RoleRepository.class
BOOT-INF/classes/com/example/demo/repository/UserRepository.class
BOOT-INF/classes/com/example/demo/service/UserService.class
META-INF/maven/com.example/demo/pom.xml
META-INF/maven/com.example/demo/pom.properties
BOOT-INF/lib/
BOOT-INF/lib/spring-boot-starter-data-jpa-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-boot-starter-aop-2.3.4.RELEASE.jar
BOOT-INF/lib/aspectjweaver-1.9.6.jar
BOOT-INF/lib/spring-boot-starter-jdbc-2.3.4.RELEASE.jar
BOOT-INF/lib/HikariCP-3.4.5.jar
BOOT-INF/lib/spring-jdbc-5.2.9.RELEASE.jar
BOOT-INF/lib/jakarta.transaction-api-1.3.3.jar
BOOT-INF/lib/jakarta.persistence-api-2.2.3.jar
BOOT-INF/lib/hibernate-core-5.4.21.Final.jar
BOOT-INF/lib/jboss-logging-3.4.1.Final.jar
BOOT-INF/lib/javassist-3.24.0-GA.jar
BOOT-INF/lib/byte-buddy-1.10.14.jar
BOOT-INF/lib/antlr-2.7.7.jar
BOOT-INF/lib/jandex-2.1.3.Final.jar
BOOT-INF/lib/classmate-1.5.1.jar
BOOT-INF/lib/dom4j-2.1.3.jar
BOOT-INF/lib/hibernate-commons-annotations-5.1.0.Final.jar
BOOT-INF/lib/jaxb-runtime-2.3.3.jar
BOOT-INF/lib/txw2-2.3.3.jar
BOOT-INF/lib/istack-commons-runtime-3.0.11.jar
BOOT-INF/lib/jakarta.activation-1.2.2.jar
BOOT-INF/lib/spring-data-jpa-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-data-commons-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-orm-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-context-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-tx-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-beans-5.2.9.RELEASE.jar
BOOT-INF/lib/slf4j-api-1.7.30.jar
BOOT-INF/lib/spring-aspects-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-boot-starter-security-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-boot-starter-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-boot-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-boot-autoconfigure-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-boot-starter-logging-2.3.4.RELEASE.jar
BOOT-INF/lib/logback-classic-1.2.3.jar
BOOT-INF/lib/logback-core-1.2.3.jar
BOOT-INF/lib/log4j-to-slf4j-2.13.3.jar
BOOT-INF/lib/log4j-api-2.13.3.jar
BOOT-INF/lib/jul-to-slf4j-1.7.30.jar
BOOT-INF/lib/jakarta.annotation-api-1.3.5.jar
BOOT-INF/lib/snakeyaml-1.26.jar
BOOT-INF/lib/spring-aop-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-security-config-5.3.4.RELEASE.jar
BOOT-INF/lib/spring-security-web-5.3.4.RELEASE.jar
BOOT-INF/lib/spring-expression-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-boot-starter-web-2.3.4.RELEASE.jar
BOOT-INF/lib/spring-boot-starter-json-2.3.4.RELEASE.jar
BOOT-INF/lib/jackson-databind-2.11.2.jar
BOOT-INF/lib/jackson-annotations-2.11.2.jar
BOOT-INF/lib/jackson-core-2.11.2.jar
BOOT-INF/lib/jackson-datatype-jdk8-2.11.2.jar
BOOT-INF/lib/jackson-datatype-jsr310-2.11.2.jar
BOOT-INF/lib/jackson-module-parameter-names-2.11.2.jar
BOOT-INF/lib/spring-boot-starter-tomcat-2.3.4.RELEASE.jar
BOOT-INF/lib/tomcat-embed-core-9.0.38.jar
BOOT-INF/lib/jakarta.el-3.0.3.jar
BOOT-INF/lib/tomcat-embed-websocket-9.0.38.jar
BOOT-INF/lib/spring-web-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-webmvc-5.2.9.RELEASE.jar
BOOT-INF/lib/postgresql-42.2.16.jar
BOOT-INF/lib/checker-qual-3.5.0.jar
BOOT-INF/lib/jakarta.xml.bind-api-2.3.3.jar
BOOT-INF/lib/jakarta.activation-api-1.2.2.jar
BOOT-INF/lib/spring-core-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-jcl-5.2.9.RELEASE.jar
BOOT-INF/lib/spring-security-core-5.3.4.RELEASE.jar
BOOT-INF/lib/assertj-core-3.16.1.jar
BOOT-INF/classpath.idx
кстати помоему в свинг то же jPasswordField1.setEchoChar('*') не уверен в JavaFX То же или нет..