fanxw 9 hours ago
parent
commit
9794b68430

+ 24 - 0
src/main/java/com/chinaitop/depot/WebSecurityConfig.java

@@ -0,0 +1,24 @@
1
+package com.chinaitop.depot;
2
+
3
+import org.springframework.context.annotation.Configuration;
4
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
5
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
6
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
7
+
8
+@Configuration
9
+@EnableWebSecurity
10
+public class WebSecurityConfig 
11
+extends WebSecurityConfigurerAdapter 
12
+{
13
+
14
+	@Override
15
+    protected void configure(HttpSecurity http) throws Exception {
16
+		http.authorizeRequests()
17
+		.antMatchers("/**")
18
+		.permitAll() //允许所有用户访问所有资源
19
+        .and()
20
+        .csrf().disable(); // 禁用CSRF(防止伪造的跨域攻击)
21
+
22
+        super.configure(http);
23
+    }
24
+}

+ 31 - 0
src/main/java/com/chinaitop/depot/system/mapper/SysCodeMapper.java

@@ -0,0 +1,31 @@
1
+package com.chinaitop.depot.system.mapper;
2
+
3
+import com.chinaitop.depot.system.model.SysCode;
4
+import com.chinaitop.depot.system.model.SysCodeExample;
5
+import com.chinaitop.depot.system.model.SysCodeKey;
6
+import java.util.List;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+public interface SysCodeMapper {
10
+    int countByExample(SysCodeExample example);
11
+
12
+    int deleteByExample(SysCodeExample example);
13
+
14
+    int deleteByPrimaryKey(SysCodeKey key);
15
+
16
+    int insert(SysCode record);
17
+
18
+    int insertSelective(SysCode record);
19
+
20
+    List<SysCode> selectByExample(SysCodeExample example);
21
+
22
+    SysCode selectByPrimaryKey(SysCodeKey key);
23
+
24
+    int updateByExampleSelective(@Param("record") SysCode record, @Param("example") SysCodeExample example);
25
+
26
+    int updateByExample(@Param("record") SysCode record, @Param("example") SysCodeExample example);
27
+
28
+    int updateByPrimaryKeySelective(SysCode record);
29
+
30
+    int updateByPrimaryKey(SysCode record);
31
+}