Spring Cron常见表达式
每分钟@Scheduled(cron = “0 * * * * *”) 每10秒@Scheduled(cron = “*/10 * * * * *”) 每5分钟@Scheduled(cron = “0 0/5 * * * ?”) 子夜@Scheduled(cron = “0 0 0 * * *”) 每天6点@Scheduled(cron = “0 0 6 * * *”) 每月1号凌晨1点执行一次@
每分钟@Scheduled(cron = “0 * * * * *”) 每10秒@Scheduled(cron = “*/10 * * * * *”) 每5分钟@Scheduled(cron = “0 0/5 * * * ?”) 子夜@Scheduled(cron = “0 0 0 * * *”) 每天6点@Scheduled(cron = “0 0 6 * * *”) 每月1号凌晨1点执行一次@
这个是2.3.x版本的,其他版本可以源码里面拿 https://github.com/spring-projects/spring-session/blob/2.3.x/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc/schema-mysql.sql 12345678910111213141516171
访问 https://jdk.java.net/15/ 复制下载链接 到服务器上用wget下载 1wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_
123456@Beanfun webMvcConfigurer() = object : WebMvcConfigurer { override fun addCorsMappings(registry: CorsRegistry) { registry.addMapping("/api/**").allow
Spring Boot打包bootjar这样就可以了 123jar { from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }} 指定Main Class,我是用Kotlin,所以类名后面加Kt 123456
增加以下配置 1234jar { enabled = true from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }}
Java 11下调用 12val mgr = ScriptEngineManager()val jsEngine = mgr.getEngineByName("JavaScript") 会产生以下Warning信息 1Warning: Nashorn engine is planned to be removed from a future JDK rele