text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
package com.springboot.dao.impl; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import com.s...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>ic class OracleStudentDaoImp implements OracleStudentDao{ @Autowired @Qualifier("oracleJdbcTemplate") private JdbcTemplate jdbcTemplate; @Override public List<Map<String, Object>> getAllStudents() { return this.jdbcTemplate.queryForList("select * from student"); } } <|fim_prefix|>package com.sp...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.datasource; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.c<|fim_suffix|>(); } @Bean(name = "mysqlJdbcTemplate") public JdbcTemplate primaryJdbcTemplate( @Qualifier("mysqldatasource") DataSo...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.service; import java.uti<|fim_suffix|>bject>> getAllStudentsFromMysql(); } <|fim_middle|>l.List; import java.util.Map; public interface StudentService { List<Map<String, Object>> getAllStudentsFromOralce(); List<Map<String, O<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>getAllStudents(); } } <|fim_prefix|>package com.springboot.service.impl; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.springboot.dao.MysqlStudentDao; import com.springboot.dao.Orac...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>g.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class,args); } } <|fim_prefix|>package com.springboot; import org.springframework.boot.SpringApplicatio<|fim_mid...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Log { String value() default ""; } <|en...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>lue()); } // 请求的方法名 String className = joinPoint.getTarget().getClass().getName(); String methodName = signature.getName(); sysLog.setMethod(className + "." + methodName + "()"); // 请求的方法参数值 Object[] args = joinPoint.getArgs(); // 请求的方法参数名称 LocalVariableTableParameterNameDiscoverer u = n...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>hrows InterruptedException { Thread.sleep(2000); } @Log("执行方法三") @GetMapping("/three") public void methodThree(String name, String age) { } } <|fim_prefix|>package com.springboot.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotati...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; import com.springboot.domain.<|fim_suffix|>nterface SysLogDao { void saveSysLog(SysLog syslog); } <|fim_middle|>SysLog; public i<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>val,:username,:operation,:time,:method,"); sql.append(":params,:ip,:createTime)"); NamedParameterJdbcTemplate npjt = new NamedParameterJdbcTemplate(this.jdbcTemplate.getDataSource()); npjt.update(sql.toString(), new BeanPropertySqlParameterSource(syslog)); } } <|fim_prefix|>package com.springboot...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>e; } public String getOperation() { return operation; } public void setOperation(String operation) { this.operation = operation; } public Integer getTime() { return time; } public void setTime(Integer time) { this.time = time; } public String getMethod() { return method; } public voi...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.util; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; public class HttpContextUtils { public static HttpServletRequest getHttpServletRequest() { return...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.util; import j<|fim_suffix|>.servlet.http.HttpServletRequest; public class IPUtils { /** * 获取IP地址 * * 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址 * 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址 */ public static Stri...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.r<|fim_suffix|> } } <|fim_middle|>un(Applica...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>countType = accountType; this.tel = tel; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { r...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>玛利亚", "e10adc3949ba59abbe56e", "清算人员", "19999999999")); m.addAttribute("accountList",list); return "account"; } } <|fim_prefix|>package com.springboot.controller; import java.util.ArrayList; import java.util.List; import org.springframework.stereotype.Controller; import org.springframew...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot; import org.springframework.boot.Spr<|fim_suffix|>ic static void main(String[] args) { SpringApplication.run(Application.class,args); } } <|fim_middle|>ingApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotatio...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.a<|fim_suffix|> } @Test public void test2() throws Exception { Student student1 = this.studentService.queryStudentBySno("001"); System.out.println("学号" + student1.getSno() + ...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>g getSno() { return sno; } public void setSno(String sno) { this.sno = sno; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } } <|fim_prefix|...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.config; import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.interceptor.KeyGenerator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation....
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.mapper; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; imp...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.service; import org.springframework.cache.a<|fim_suffix|>ot.bean.Student; @CacheConfig(cacheNames = "student") public interface StudentService { @CachePut(key = "#p0.sno") Student update(Student student); @CacheEvict(key = "#p0", allEntries = true) void deleteStudentBySno(Str...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>e public Student update(Student student) { this.studentMapper.update(student); return this.studentMapper.queryStudentBySno(student.getSno()); } @Override public void deleteStudentBySno(String sno) { this.studentMapper.deleteStudentBySno(sno); } @Override public Student queryStudentBySno(Str...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package<|fim_suffix|>atic void main(String[] args) { SpringApplication.run(Application.class,args); } } <|fim_middle|> com.springboot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cache.annotation.Ena...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.spri<|fim_suffix|>hrows Exception { Student student1 = this.studentService.queryStudentBySno("001"); System.out.println("学号" + student1...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>516038496531943L; private String sno; private String name; private String sex; public String getSno() { return sno; } public void setSno(String sno) { this.sno = sno; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSex(...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.mapper; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import com.sprin...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.service; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.Cacheable; <|fim_suffix|> = true) void deleteStudentBySno(Str...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>o) { return this.studentMapper.queryStudentBySno(sno); } } <|fim_prefix|>package com.springboot.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.springboot.bean.Student; import com.springboot.mapper.StudentMappe...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot; import org.springframework.boot.SpringApplication; import org.sp<|fim_suffix|>boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class,args); } } <|fim_middl...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.config; import java.util.LinkedHashMap; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.springframework.context.annotat<|fim_suffix|>anager(securityManager...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.controller; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; im<|fim_suffix|>).getPrincipal(); model.addAttribute("user", user); return "index"; } } <|fim_middle|>port org.apache.shiro.authc.IncorrectCredentialsException; import org...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.dao; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.User; @Mapper public interface UserMapper { User findByUserName(String userName); } <|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.pojo; import java.util.HashMap; impor<|fim_suffix|>Bo = new ResponseBo(); ResponseBo.put("code", code); ResponseBo.put("msg", msg); return ResponseBo; } public static ResponseBo ok(String msg) { ResponseBo ResponseBo = new ResponseBo(); ResponseBo.put("msg", msg); re...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.pojo; import java.io.Serializable; import java.util.Date; public class User imple<|fim_suffix|>eateTime = createTime; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } } <|fim_middle|>ments Serializable{ p...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.shiro; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.LockedAccountException; impo...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|> SimpleHash(ALGORITH_NAME, pswd, ByteSource.Util.bytes(SALT), HASH_ITERATIONS).toHex(); return newPassword; } public static String encrypt(String username, String pswd) { String newPassword = new SimpleHash(ALGORITH_NAME, pswd, ByteSource.Util.bytes(username + SALT), HASH_ITERATIONS).toHex(); ...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined...
fim
wuyouzhuguli/SpringAll
javascript
<|fim_prefix|>package com.springboot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBo<|fim_suffix|>ication.run(Application.class,args); } } <|fim_middle|>otApplication; @SpringBootApplication public class Application { public static void main(String[] arg...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.config; import java.util.LinkedHashMap; import org.apache.shiro.codec.Base64; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.spring.LifecycleBeanPostProcessor; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.CookieRe...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.controller; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.LockedAccountException; import org.apache.shiro.authc.UnknownAccountException; import...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; import<|fim_suffix|>.Mapper; import com.springboot.pojo.User; @Mapper public interface UserMapper { User findByUserName(String userName); } <|fim_middle|> org.apache.ibatis.annotations<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|> public static ResponseBo error(int code, String msg) { ResponseBo ResponseBo = new ResponseBo(); ResponseBo.put("code", code); ResponseBo.put("msg", msg); return ResponseBo; } public static ResponseBo ok(String msg) { ResponseBo ResponseBo = new ResponseBo(); ResponseBo.put("msg", msg); ...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.pojo; import java.io.Serializable; import java.util.Date; public class User implements Serializable{ private static final long serialVersionUID = -5440372534300871944L; private Integer id; private String userName; private String password; private Date createTime; private ...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>har[]) token.getCredentials()); System.out.println("用户" + userName + "认证-----ShiroRealm.doGetAuthenticationInfo"); User user = userMapper.findByUserName(userName); if (user == null) { throw new UnknownAccountException("用户名或密码错误!"); } if (!password.equals(user.getPassword())) { throw new ...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.util; import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.util.ByteSource; public class MD5Utils { private static final String SALT = "mrbird"; private static final String ALGORITH_NAME = "md5"; private static final int HASH_ITERATIONS = 2; public static...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined...
fim
wuyouzhuguli/SpringAll
javascript
<|fim_suffix|>[] args) { SpringApplication.run(Application.class,args); } } <|fim_prefix|>package com.sp<|fim_middle|>ringboot; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>thorizationAttributeSourceAdvisor(SecurityManager securityManager) { AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor(); authorizationAttributeSourceAdvisor.setSecurityManager(securityManager); return authorizationAtt...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.controller; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.LockedAccountException; import org.apache.shiro.authc.UnknownAccountException; import...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.controller; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping("/user") public class UserController { ...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; import org.apache<|fim_suffix|>ort com.springboot.pojo.User; @Mapper public interface UserMapper { User findByUserName(String userName); } <|fim_middle|>.ibatis.annotations.Mapper; imp<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>g userName); } <|fim_prefix|>package com.springboot.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.<|fim_middle|>Permission; @Mapper public interface UserPermissionMapper { List<Permission> findByUserName(Strin<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>Mapper; import com.springboot.pojo.Role; @Mapper public interface UserRoleMapper { List<Role> findByUserName(String userName); } <|fim_prefix|>package com.springboot.dao; import java.util.List; import org.apache.ibatis.annotations<|fim_middle|>.<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
package com.springboot.handler; import org.apache.shiro.authz.AuthorizationException; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; @Controlle...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|> id; private String url; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getName() { return name; } public void setName(...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>ponseBo(); ResponseBo.putAll(map); return ResponseBo; } public static ResponseBo ok() { return new ResponseBo(); } @Override public ResponseBo put(String key, Object value) { super.put(key, value); return this; } } <|fim_prefix|>package com.springboot.pojo; import java.util.HashMap; imp...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } } <|fim_prefix|>package com.springboot.pojo; import java.io.Serializable; public class Role implements Serializable{ private static final long serialVersionUID = -227437593919820521L; p...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>etPassword() { return password; } public void setPassword(String password) { this.password = password; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getStatus() { return status; } public v...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>= null) { throw new UnknownAccountException("用户名或密码错误!"); } if (!password.equals(user.getPassword())) { throw new IncorrectCredentialsException("用户名或密码错误!"); } if (user.getStatus().equals("0")) { throw new LockedAccountException("账号已被锁定,请联系管理员!"); } SimpleAuthenticationInfo info = new...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.util; import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.util.ByteSource; public class MD5Utils { private static final String SALT = "mrbird"; private static final String ALGORITH_NAME = "md5"; private static final int HASH_ITERATIONS = 2; public static...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>it keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){re...
fim
wuyouzhuguli/SpringAll
javascript
<|fim_suffix|>ublic class Application { public static void main(String[] args) { SpringApplication.run(Application.class,args); } } <|fim_prefix|>package com.springboot; import org.springframework.boot.SpringApplication; import <|fim_middle|>org.springframework.boot.autoconfigure.SpringBootApplication; @Spring...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>nager) { AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor(); authorizationAttributeSourceAdvisor.setSecurityManager(securityManager); return authorizationAttributeSourceAdvisor; } public RedisManager redisMa...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.controller; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.LockedAccountException; import org.apache.shiro.authc.UnknownAccountException; import...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>d.annotation.RequestMapping; @Controller @RequestMapping("/user") public class UserController { @RequiresPermissions("user:user") @RequestMapping("list") public String userList(Model model) { model.addAttribute("value", "获取用户信息"); return "user"; } @RequiresPermissions("user:add") @Request...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>ng userName); } <|fim_prefix|>package com.springboot.dao; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.User; @Mapper public interf<|fim_middle|>ace UserMapper { User findByUserName(Stri<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
package com.springboot.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.Permission; @Mapper public interface UserPermissionMapper { List<Permission> findByUserName(String userName); } <|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>ace UserRoleMapper { List<Role> findByUserName(String userName); } <|fim_prefix|>package <|fim_middle|>com.springboot.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.Role; @Mapper public interf<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.handler; import org.apache.shiro.authz.AuthorizationException; import org.spri<|fim_suffix|>ion.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; @ControllerAdvice @Order(value = Ordered.HIGHEST_PRECEDENCE) public class GlobalExceptionHandler { ...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.pojo; import java.io.Serializable; public class Permission implements Serializable{ private static final long serialVersionUID = 7160557680614732403L; private Integer id; private String url; private String name; public Integer getId() { return id; } public void setId(Int...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.pojo; import java.util.HashMap; import java.util.Map; public class ResponseBo extends HashMap<String, Object>{ private static final long serialVersionUID = 1L; public ResponseBo() { put("code", 0); put("msg", "操作成功"); } public static ResponseBo error() { return error(1, "操作失败"); } ...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|> public String getName() { return name; } public void setName(String name) { this.name = name; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } } <|fim_prefix|>package com.springboot.pojo; import java.io.S<|fim_middle|>erializable; pu...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.pojo; import java.io.Serializable; import java.util.Date; public class User implements S<|fim_suffix|>) { this.password = password; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public ...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.shiro; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shir...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>turn newPassword; } public static String encrypt(String username, String pswd) { String newPassword = new SimpleHash(ALGORITH_NAME, pswd, ByteSource.Util.bytes(username + SALT), HASH_ITERATIONS).toHex(); return newPassword; } public static void main(String[] args) { System.out.println(MD...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined...
fim
wuyouzhuguli/SpringAll
javascript
<|fim_prefix|>package com.springboot; import org.springframework.bo<|fim_suffix|>toconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class,args); } } <|fim_middle|>ot.SpringApplication; import org.spring...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>rFactoryBean.setLoginUrl("/login"); shiroFilterFactoryBean.setSuccessUrl("/index"); shiroFilterFactoryBean.setUnauthorizedUrl("/403"); LinkedHashMap<String, String> filterChainDefinitionMap = new LinkedHashMap<>(); filterChainDefinitionMap.put("/css/**", "anon"); filterChainDefinitionMap.put(...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.controller; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.LockedAccountException; import org.apache.shiro.authc.UnknownAccountException; import...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>g; @Controller @RequestMapping("/user") public class UserController { @RequiresPermissions("user:user") @RequestMapping("list") public String userList(Model model) { model.addAttribute("value", "获取用户信息"); return "user"; } @RequiresPermissions("user:add") @RequestMapping("add") public Str...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; im<|fim_suffix|>er; import com.springboot.pojo.User; @Mapper public interface UserMapper { User findByUserName(String userName); } <|fim_middle|>port org.apache.ibatis.annotations.Mapp<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; import java.util<|fim_suffix|>port com.springboot.pojo.Permission; @Mapper public interface UserPermissionMapper { List<Permission> findByUserName(String userName); } <|fim_middle|>.List; import org.apache.ibatis.annotations.Mapper; im<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; import java.util.List; import org.apache.ibatis.<|fim_suffix|>Name(String userName); } <|fim_middle|>annotations.Mapper; import com.springboot.pojo.Role; @Mapper public interface UserRoleMapper { List<Role> findByUser<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>uthorizationException; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; @ControllerAdvice @Order(value = Ordered.HIGHEST_PRECEDENCE)...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.pojo; import java.io.Serializable<|fim_suffix|>vate String url; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } pub...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.pojo; import java.util.HashMap; import java.util.Map; public class ResponseBo extends HashMap<String, Object>{ private static final long serialVersionUID = 1L; public ResponseBo() { put("code", 0); put("msg", "操作成功"); } public static ResponseBo error() { return error(1, "操作失败"); } ...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|> public String getName() { return name; } public void setName(String name) { this.name = name; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } } <|fim_prefix|>package com.springboot.pojo; import java.io.Serializable; public class Rol...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>assword; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } } <|fim_prefix|>package com.springboo...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.shiro; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shir...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.util; import org.apache.shiro.crypto.hash.SimpleHash; import org.apache.shiro.util.ByteSource; public class MD5Utils { private static final String SALT = "mrbird"; private static final String ALGORITH_NAME = "md5"; private static final int HASH_ITERATIONS = 2; public static String encryp...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasCont...
fim
wuyouzhuguli/SpringAll
javascript
<|fim_suffix|>n.run(Application.class,args); } } <|fim_prefix|>package com.springboot; import org.springframework.boot.SpringApplication; import or<|fim_middle|>g.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { ...
fim
wuyouzhuguli/SpringAll
java
package com.springboot.config; import java.util.LinkedHashMap; import org.apache.shiro.cache.ehcache.EhCacheManager; import org.apache.shiro.codec.Base64; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.spring.LifecycleBeanPostProcessor; import org.apache.shiro.spring.security.interceptor.Authori...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>esponseBo.ok(); } catch (UnknownAccountException e) { return ResponseBo.error(e.getMessage()); } catch (IncorrectCredentialsException e) { return ResponseBo.error(e.getMessage()); } catch (LockedAccountException e) { return ResponseBo.error(e.getMessage()); } catch (AuthenticationExceptio...
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.controller; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.ste<|fim_suffix|>r { @RequiresPermissions("user:user") @RequestMapping("list") public String userList(Model model) { model.addAttribute("value", "获取用户信息"); return "user";...
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>{ User findByUserName(String userName); } <|fim_prefix|>package com.springboot.dao; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.User; @Mappe<|fim_middle|>r public interface UserMapper <|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_suffix|>rName(String userName); } <|fim_prefix|>package com.springboot.dao; i<|fim_middle|>mport java.util.List; import org.apache.ibatis.annotations.Mapper; import com.springboot.pojo.Permission; @Mapper public interface UserPermissionMapper { List<Permission> findByUse<|endoftext|>
fim
wuyouzhuguli/SpringAll
java
<|fim_prefix|>package com.springboot.dao; import java.util.List; import org.apache.ibatis.annota<|fim_suffix|>ng userName); } <|fim_middle|>tions.Mapper; import com.springboot.pojo.Role; @Mapper public interface UserRoleMapper { List<Role> findByUserName(Stri<|endoftext|>
fim
wuyouzhuguli/SpringAll
java