Просмотр исходного кода

User groovy->java

Issue: gh-4939
Rob Winch 7 лет назад
Родитель
Сommit
1217547ebd

+ 8 - 2
config/src/test/groovy/org/springframework/security/config/annotation/issue50/domain/User.java → config/src/test/java/org/springframework/security/config/annotation/issue50/domain/User.java

@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2018 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -59,4 +59,10 @@ public class User {
 		this.password = password;
 	}
 
-}
+	public static User withUsernameAndPassword(String username, String password) {
+		User user = new User();
+		user.setUsername(username);
+		user.setPassword(password);
+		return  user;
+	}
+}