refactor(runner): add TODO plan for InitUserRunner refactoring
Outline a 3-step migration plan: hardcoded init → config-driven → frontend-driven initialization
This commit is contained in:
@@ -22,6 +22,13 @@ import org.springframework.transaction.annotation.Transactional
|
|||||||
* 幂等性:启动前会先查数据库判断用户是否已存在,已存在则跳过
|
* 幂等性:启动前会先查数据库判断用户是否已存在,已存在则跳过
|
||||||
* 事务保护:整个 run 方法在 @Transactional 中执行,任意插入失败会整体回滚
|
* 事务保护:整个 run 方法在 @Transactional 中执行,任意插入失败会整体回滚
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* @TODO:
|
||||||
|
* 三步走:
|
||||||
|
* 1. 暂时先用这个
|
||||||
|
* 2. 支持配置文件
|
||||||
|
* 3. 完全前端初始化
|
||||||
|
*/
|
||||||
@Component
|
@Component
|
||||||
class InitUserRunner(
|
class InitUserRunner(
|
||||||
val passwordEncoder: PasswordEncoder,
|
val passwordEncoder: PasswordEncoder,
|
||||||
|
|||||||
Reference in New Issue
Block a user