| | |
| | | import org.springframework.boot.web.servlet.ServletComponentScan; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.servlet.config.annotation.EnableWebMvc; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; |
| | |
| | | @EnableCaching |
| | | public class Application extends WebMvcConfigurerAdapter implements WebMvcConfigurer { |
| | | |
| | | @Transactional |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(Application.class,args); |
| | | ApplicationContext applicationContext = SpringUtil.getApplicationContext(); |
| | | PasswordResetService service = (PasswordResetService) applicationContext.getBean("passwordResetService"); |
| | | |
| | | //备份重要密码信息 |
| | | service.bakUserInfo(); |
| | | //更新字段Snid和upassword长度 |
| | | service.updateLength(); |
| | | //密码格式重置 |
| | | service.passwordReset(); |
| | | int sleepSeconds = 3; |