parent
b77dbadd4a
commit
243d960e1b
|
@ -2,6 +2,7 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<annotationProcessing>
|
<annotationProcessing>
|
||||||
|
<profile default="true" name="Default" enabled="true" />
|
||||||
<profile name="Maven default annotation processors profile" enabled="true">
|
<profile name="Maven default annotation processors profile" enabled="true">
|
||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
|
@ -1,25 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
package com.atguigu.spzx.manger;
|
||||||
<configuration>
|
|
||||||
|
|
||||||
<contextName>logback</contextName>
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cache.annotation.EnableCaching;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
<!-- 日志的输出目录 -->
|
@SpringBootApplication
|
||||||
<property name="log.path" value="D://logs//spzx-manager//logs" />
|
@EnableTransactionManagement // 开启注解方式的事务管理
|
||||||
|
@EnableCaching// 开启缓存注解
|
||||||
<!--控制台日志格式:彩色日志-->
|
@EnableScheduling
|
||||||
<!-- magenta:洋红 -->
|
@ComponentScan("com.atguigu")
|
||||||
<!-- boldMagenta:粗红-->
|
@MapperScan("com.atguigu.spzx.manger.mapper")
|
||||||
<!-- cyan:青色 -->
|
@Slf4j
|
||||||
<!-- white:白色 -->
|
public class MangerApplication {
|
||||||
<!-- magenta:洋红 -->
|
public static void main(String[] args) {
|
||||||
<property name="CONSOLE_LOG_PATTERN" value="%yellow(%date{yyyy-MM-dd HH:mm:ss}) %highlight([%-5level]) %green(%logger) %msg%n"/>
|
SpringApplication.run(MangerApplication.class, args);
|
||||||
|
}
|
||||||
<!--文件日志格式-->
|
}
|
||||||
<property name="FILE_LOG_PATTERN" value="%date{yyyy-MM-dd HH:mm:ss} [%-5level] %thread %file:%line %logger %msg%n" />
|
|
||||||
|
|
||||||
<!--编码-->
|
|
||||||
<property name="ENCODING" value="UTF-8" />
|
|
||||||
|
|
||||||
<!-- 控制台日志 -->
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<!-- 临界值过滤器 -
|
|
||||||
|
|
|
@ -1,22 +1,18 @@
|
||||||
package com.atguigu.spzx.manger.controller;
|
package com.atguigu.spzx.manger.controller;
|
||||||
|
|
||||||
import com.atguigu.context.BaseContext;
|
import com.atguigu.context.BaseContext;
|
||||||
import com.atguigu.spzx.manger.service.SysMenuService;
|
|
||||||
import com.atguigu.spzx.manger.service.SysUserService;
|
import com.atguigu.spzx.manger.service.SysUserService;
|
||||||
import com.atguigu.spzx.manger.service.ValidateCodeService;
|
import com.atguigu.spzx.manger.service.ValidateCodeService;
|
||||||
import com.atguigu.spzx.model.dto.system.LoginDto;
|
import com.atguigu.spzx.model.dto.system.LoginDto;
|
||||||
import com.atguigu.spzx.model.entity.system.SysUser;
|
import com.atguigu.spzx.model.entity.system.SysUser;
|
||||||
import com.atguigu.spzx.model.vo.result.Result;
|
import com.atguigu.spzx.model.vo.result.Result;
|
||||||
import com.atguigu.spzx.model.vo.system.LoginVo;
|
import com.atguigu.spzx.model.vo.system.LoginVo;
|
||||||
import com.atguigu.spzx.model.vo.system.SysMenuVo;
|
|
||||||
import com.atguigu.spzx.model.vo.system.ValidateCodeVo;
|
import com.atguigu.spzx.model.vo.system.ValidateCodeVo;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Tag(name = "用户相关接口")
|
@Tag(name = "用户相关接口")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/admin/system/index")
|
@RequestMapping("/admin/system/index")
|
||||||
|
@ -24,8 +20,6 @@ public class IndexController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserService sysUserService;
|
private SysUserService sysUserService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysMenuService sysMenuService;
|
|
||||||
@Autowired
|
|
||||||
private ValidateCodeService validateCodeService;
|
private ValidateCodeService validateCodeService;
|
||||||
|
|
||||||
@Operation(summary = "生成验证码", description = "生成验证码信息")
|
@Operation(summary = "生成验证码", description = "生成验证码信息")
|
||||||
|
@ -50,3 +44,9 @@ public class IndexController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "用户退出", description = "用户退出接口")
|
@Operation(summary = "用户退出", description = "用户退出接口")
|
||||||
|
@GetMapping("logout")
|
||||||
|
public Result<String> logout(@RequestHeader(name = "token") String token) {
|
||||||
|
sysUserService.logout(token);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,7 +42,7 @@ public class SysMenuController {
|
||||||
|
|
||||||
@Operation(summary = "删除菜单", description = "删除菜单")
|
@Operation(summary = "删除菜单", description = "删除菜单")
|
||||||
@PutMapping("removeById/{id}")
|
@PutMapping("removeById/{id}")
|
||||||
public Result removeById(@PathVariable Long id) {
|
public Result<Long> removeById(@PathVariable Long id) {
|
||||||
sysMenuService.removeById(id);
|
sysMenuService.removeById(id);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,12 @@ package com.atguigu.spzx.manger.service.module;
|
||||||
|
|
||||||
import com.atguigu.spzx.manger.mapper.SysMenuMapper;
|
import com.atguigu.spzx.manger.mapper.SysMenuMapper;
|
||||||
import com.atguigu.spzx.manger.mapper.SysRoleMenuMapper;
|
import com.atguigu.spzx.manger.mapper.SysRoleMenuMapper;
|
||||||
import com.atguigu.spzx.manger.service.impl.SysMenuServiceImpl;
|
|
||||||
import com.atguigu.spzx.model.entity.system.SysMenu;
|
import com.atguigu.spzx.model.entity.system.SysMenu;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class SysMenuServiceImplModule extends SysMenuServiceImpl {
|
public class SysMenuServiceImplModule {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysMenuMapper sysMenuMapper;
|
private SysMenuMapper sysMenuMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
Loading…
Reference in New Issue