feat(web): 完成集成warm-flow
This commit is contained in:
@@ -4,12 +4,14 @@ import com.blinkfox.fenix.EnableFenix;
|
||||
import com.eshore.gringotts.web.domain.entity.User;
|
||||
import com.eshore.gringotts.web.domain.service.UserService;
|
||||
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.warm.flow.spring.boot.config.FlowAutoConfig;
|
||||
import org.dromara.warm.flow.core.service.DefService;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -24,7 +26,11 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
* @date 2024-11-14
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootApplication(scanBasePackages = {"com.eshore.gringotts"}, exclude = {FlowAutoConfig.class})
|
||||
@SpringBootApplication(scanBasePackages = {"com.eshore.gringotts"})
|
||||
@EntityScan({
|
||||
"com.eshore.gringotts.web.domain.entity",
|
||||
"org.dromara.warm.flow.orm.entity"
|
||||
})
|
||||
@EnableFenix
|
||||
@EnableJpaAuditing
|
||||
@EnableAsync
|
||||
@@ -42,10 +48,15 @@ public class WebApplication implements ApplicationRunner {
|
||||
SpringApplication.run(WebApplication.class, args);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private DefService defService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
// 初始化系统管理员
|
||||
userService.initial();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -30,6 +30,8 @@ public class SaTokenConfiguration implements WebMvcConfigurer {
|
||||
.notMatch("/pages/**")
|
||||
.notMatch("/user/**")
|
||||
.notMatch("/upload/download/**")
|
||||
.notMatch("/warm-flow-ui/**")
|
||||
.notMatch("/warm-flow/**")
|
||||
.check(r -> {
|
||||
try {
|
||||
StpUtil.checkLogin();
|
||||
|
||||
Reference in New Issue
Block a user