repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/model/entity/Job.java
// Path: src/main/java/yourwebproject2/framework/data/JPAEntity.java // @MappedSuperclass // public abstract class JPAEntity<T extends Serializable> implements Entity { // protected T id; // protected Date createdAt; // protected Date updatedAt; // // // public JPAEntity() { // createdAt = ne...
import yourwebproject2.framework.data.JPAEntity; import org.hibernate.validator.constraints.NotBlank; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.util.Date;
package yourwebproject2.model.entity; /** * The core Job Entity * * Created by Y.Kamesh on 8/2/2015. */ @Entity @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), @Index(name="status_idx", columnList = "status"), @Index(name="category_idx", columnList = "category")})
// Path: src/main/java/yourwebproject2/framework/data/JPAEntity.java // @MappedSuperclass // public abstract class JPAEntity<T extends Serializable> implements Entity { // protected T id; // protected Date createdAt; // protected Date updatedAt; // // // public JPAEntity() { // createdAt = ne...
public class Job extends JPAEntity<Long> {
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/unusedspringsecurity/UserDetailsServiceImpl.java
// Path: src/main/java/yourwebproject2/framework/exception/EmailNotFoundException.java // public class EmailNotFoundException extends AuthenticationException { // public EmailNotFoundException(String message) { // super(message); // } // } // // Path: src/main/java/yourwebproject2/model/entity/User.jav...
import yourwebproject2.framework.exception.EmailNotFoundException; import yourwebproject2.model.entity.User; import yourwebproject2.model.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.GrantedAuthority; import org.springframework.securi...
package yourwebproject2.unusedspringsecurity; /** * @author: kameshr */ @Service @Transactional public class UserDetailsServiceImpl implements UserDetailsService {
// Path: src/main/java/yourwebproject2/framework/exception/EmailNotFoundException.java // public class EmailNotFoundException extends AuthenticationException { // public EmailNotFoundException(String message) { // super(message); // } // } // // Path: src/main/java/yourwebproject2/model/entity/User.jav...
private @Autowired UserRepository userRepository;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/unusedspringsecurity/UserDetailsServiceImpl.java
// Path: src/main/java/yourwebproject2/framework/exception/EmailNotFoundException.java // public class EmailNotFoundException extends AuthenticationException { // public EmailNotFoundException(String message) { // super(message); // } // } // // Path: src/main/java/yourwebproject2/model/entity/User.jav...
import yourwebproject2.framework.exception.EmailNotFoundException; import yourwebproject2.model.entity.User; import yourwebproject2.model.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.GrantedAuthority; import org.springframework.securi...
package yourwebproject2.unusedspringsecurity; /** * @author: kameshr */ @Service @Transactional public class UserDetailsServiceImpl implements UserDetailsService { private @Autowired UserRepository userRepository; @Override @Transactional(readOnly=true) public UserDetails loadUserByUsername(String...
// Path: src/main/java/yourwebproject2/framework/exception/EmailNotFoundException.java // public class EmailNotFoundException extends AuthenticationException { // public EmailNotFoundException(String message) { // super(message); // } // } // // Path: src/main/java/yourwebproject2/model/entity/User.jav...
throws EmailNotFoundException {
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/unusedspringsecurity/UserDetailsServiceImpl.java
// Path: src/main/java/yourwebproject2/framework/exception/EmailNotFoundException.java // public class EmailNotFoundException extends AuthenticationException { // public EmailNotFoundException(String message) { // super(message); // } // } // // Path: src/main/java/yourwebproject2/model/entity/User.jav...
import yourwebproject2.framework.exception.EmailNotFoundException; import yourwebproject2.model.entity.User; import yourwebproject2.model.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.GrantedAuthority; import org.springframework.securi...
} @Override public String getUsername() { return null; } @Override public boolean isAccountNonExpired() { return false; } @Override public boolean isAccountNonLocked() { ...
// Path: src/main/java/yourwebproject2/framework/exception/EmailNotFoundException.java // public class EmailNotFoundException extends AuthenticationException { // public EmailNotFoundException(String message) { // super(message); // } // } // // Path: src/main/java/yourwebproject2/model/entity/User.jav...
private org.springframework.security.core.userdetails.User buildUserForAuthentication(User user,
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/unusedspringsecurity/RESTAuthFilter.java
// Path: src/main/java/yourwebproject2/service/UserService.java // public interface UserService extends BaseService<User, Long> { // // /** // * Register a new user into the system // * // * @param user // * @param request // * // * @return // */ // public User registerUser(U...
import yourwebproject2.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.filter.OncePerRequestFilter; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServ...
package yourwebproject2.unusedspringsecurity; /** * @author: kameshr */ public class RESTAuthFilter extends OncePerRequestFilter { @Autowired
// Path: src/main/java/yourwebproject2/service/UserService.java // public interface UserService extends BaseService<User, Long> { // // /** // * Register a new user into the system // * // * @param user // * @param request // * // * @return // */ // public User registerUser(U...
private UserService userService;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/JobExecutionThread.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Date; import java.util.concurrent.Callable;
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/2/2015. */ public class JobExecutionThread implements Callable { private static Logger LOG = LoggerFactory.getLogger(JobExecutionThread.class);
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
private Job job;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/service/CategoryService.java
// Path: src/main/java/yourwebproject2/framework/data/BaseService.java // public interface BaseService<T extends Entity, ID extends Serializable> { // /** // * Method to setup the service with basic // * required data. Called after Spring initialization. // */ // public void setupService(); // /...
import yourwebproject2.framework.data.BaseService; import yourwebproject2.framework.exception.NotFoundException; import yourwebproject2.model.entity.Category; import java.util.List;
package yourwebproject2.service; /** * Brings in the basic CRUD service ops from BaseService. Insert additional ops here. * * Created by Y.Kamesh on 8/2/2015. */ public interface CategoryService extends BaseService<Category, Long> { /** * Validates whether the given category already * exists in the...
// Path: src/main/java/yourwebproject2/framework/data/BaseService.java // public interface BaseService<T extends Entity, ID extends Serializable> { // /** // * Method to setup the service with basic // * required data. Called after Spring initialization. // */ // public void setupService(); // /...
public Category findByCategoryName(String categoryName) throws NotFoundException;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/auth/JWTTokenAuthFilter.java
// Path: src/main/java/yourwebproject2/service/UserService.java // public interface UserService extends BaseService<User, Long> { // // /** // * Register a new user into the system // * // * @param user // * @param request // * // * @return // */ // public User registerUser(U...
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import yourwebproject2.service.UserService; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.filter.OncePerRequest...
package yourwebproject2.auth; /** * @author: kameshr */ public class JWTTokenAuthFilter extends OncePerRequestFilter { private static List<Pattern> AUTH_ROUTES = new ArrayList<>(); private static List<String> NO_AUTH_ROUTES = new ArrayList<>(); public static final String JWT_KEY = "JWT-TOKEN-SECRET"; ...
// Path: src/main/java/yourwebproject2/service/UserService.java // public interface UserService extends BaseService<User, Long> { // // /** // * Register a new user into the system // * // * @param user // * @param request // * // * @return // */ // public User registerUser(U...
private UserService userService;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/RetryJobSchedulingWorker.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.helper.CategoryPriorityComparator; import yourwebproject2.service.JobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotat...
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/5/2015. */ public class RetryJobSchedulingWorker extends AbstractJobSchedulingWorker { private static Logger LOG = LoggerFactory.getLogger(RetryJobSchedulingWorker.class); @Autowired
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
private JobService jobService;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/RetryJobSchedulingWorker.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.helper.CategoryPriorityComparator; import yourwebproject2.service.JobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotat...
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/5/2015. */ public class RetryJobSchedulingWorker extends AbstractJobSchedulingWorker { private static Logger LOG = LoggerFactory.getLogger(RetryJobSchedulingWorker.class); @Autowired private JobService jobService; private ExecutorServic...
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
List<Job> retryableJobs = jobService.fetchFailedJobsToBeScheduledForExecutionPerSubmissionTimePriority(10);
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/RetryJobSchedulingWorker.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.helper.CategoryPriorityComparator; import yourwebproject2.service.JobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotat...
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/5/2015. */ public class RetryJobSchedulingWorker extends AbstractJobSchedulingWorker { private static Logger LOG = LoggerFactory.getLogger(RetryJobSchedulingWorker.class); @Autowired private JobService jobService; private ExecutorServic...
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
Collections.sort(retryableJobs, new CategoryPriorityComparator());
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/framework/controller/BaseController.java
// Path: src/main/java/yourwebproject2/model/dto/UserDTO.java // public class UserDTO { // String email; // String password; // String displayName; // String encryptedPassword; // String iv; // String salt; // int keySize; // int iterations; // // public String getEmail() { // ...
import yourwebproject2.model.dto.UserDTO; import org.apache.commons.lang.Validate; import org.json.JSONObject; import org.springframework.security.crypto.codec.Base64; import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.Scanner;
package yourwebproject2.framework.controller; /** * All controllers in spring should extend this controller so as to have * centralize control for doing any sort of common functionality. * e.g. extracting data from post request body * * @author : Y Kamesh Rao */ public abstract class BaseController { prote...
// Path: src/main/java/yourwebproject2/model/dto/UserDTO.java // public class UserDTO { // String email; // String password; // String displayName; // String encryptedPassword; // String iv; // String salt; // int keySize; // int iterations; // // public String getEmail() { // ...
public void decorateUserDTOWithCredsFromAuthHeader(String authHeader, UserDTO userDTO) {
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/model/entity/Category.java
// Path: src/main/java/yourwebproject2/framework/data/JPAEntity.java // @MappedSuperclass // public abstract class JPAEntity<T extends Serializable> implements Entity { // protected T id; // protected Date createdAt; // protected Date updatedAt; // // // public JPAEntity() { // createdAt = ne...
import yourwebproject2.framework.data.JPAEntity; import org.hibernate.validator.constraints.NotBlank; import javax.persistence.*; import javax.validation.constraints.NotNull;
package yourwebproject2.model.entity; /** * Category Entity * * Created by Y.Kamesh on 8/2/2015. */ @Entity @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), @Index(name="priority_idx", columnList = "priority"), @Index(name="parentCategory_idx", columnList = "parent...
// Path: src/main/java/yourwebproject2/framework/data/JPAEntity.java // @MappedSuperclass // public abstract class JPAEntity<T extends Serializable> implements Entity { // protected T id; // protected Date createdAt; // protected Date updatedAt; // // // public JPAEntity() { // createdAt = ne...
public class Category extends JPAEntity<Long> {
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/tool/CategoryTool.java
// Path: src/main/java/yourwebproject2/model/entity/Category.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="priority_idx", columnList = "priority"), // @Index(name="parentCategory_idx", columnList = "parent_category")}) // public class...
import yourwebproject2.model.entity.Category; import yourwebproject2.service.CategoryService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.HashMap;
break; case "parent": params.put("parent", p[1]); break; } } Integer priority = null; if(params.containsKey("name") && (params.containsKey("priority") || params.containsKey("parent"))) { if(param...
// Path: src/main/java/yourwebproject2/model/entity/Category.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="priority_idx", columnList = "priority"), // @Index(name="parentCategory_idx", columnList = "parent_category")}) // public class...
CategoryService categoryService = (CategoryService) ctx.getBean("categoryServiceImpl");
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/tool/CategoryTool.java
// Path: src/main/java/yourwebproject2/model/entity/Category.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="priority_idx", columnList = "priority"), // @Index(name="parentCategory_idx", columnList = "parent_category")}) // public class...
import yourwebproject2.model.entity.Category; import yourwebproject2.service.CategoryService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.HashMap;
Integer priority = null; if(params.containsKey("name") && (params.containsKey("priority") || params.containsKey("parent"))) { if(params.containsKey("priority")) { try { priority = Integer.parseInt(params.get("priority")); } catch (NumberFor...
// Path: src/main/java/yourwebproject2/model/entity/Category.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="priority_idx", columnList = "priority"), // @Index(name="parentCategory_idx", columnList = "parent_category")}) // public class...
Category parentCategory = null;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/NewJobSchedulingWorker.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.helper.CategoryPriorityComparator; import yourwebproject2.service.JobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotat...
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/5/2015. */ public class NewJobSchedulingWorker extends AbstractJobSchedulingWorker { private static Logger LOG = LoggerFactory.getLogger(NewJobSchedulingWorker.class); @Autowired
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
private JobService jobService;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/NewJobSchedulingWorker.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.helper.CategoryPriorityComparator; import yourwebproject2.service.JobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotat...
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/5/2015. */ public class NewJobSchedulingWorker extends AbstractJobSchedulingWorker { private static Logger LOG = LoggerFactory.getLogger(NewJobSchedulingWorker.class); @Autowired private JobService jobService; private ExecutorService ex...
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
List<Job> newJobs = jobService.fetchNewJobsToBeScheduledForExecutionPerSubmissionTimePriority(10);
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/core/NewJobSchedulingWorker.java
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
import yourwebproject2.model.entity.Job; import yourwebproject2.model.entity.helper.CategoryPriorityComparator; import yourwebproject2.service.JobService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotat...
package yourwebproject2.core; /** * Created by Y.Kamesh on 8/5/2015. */ public class NewJobSchedulingWorker extends AbstractJobSchedulingWorker { private static Logger LOG = LoggerFactory.getLogger(NewJobSchedulingWorker.class); @Autowired private JobService jobService; private ExecutorService ex...
// Path: src/main/java/yourwebproject2/model/entity/Job.java // @Entity // @Table(indexes = { @Index(name="name_idx", columnList = "name", unique = true), // @Index(name="status_idx", columnList = "status"), // @Index(name="category_idx", columnList = "category")}) // public class Job extends JPAEntity...
Collections.sort(newJobs, new CategoryPriorityComparator());
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/unusedspringsecurity/UserRole.java
// Path: src/main/java/yourwebproject2/model/entity/User.java // @Entity // @Inheritance(strategy = InheritanceType.SINGLE_TABLE) // @Table(indexes = { @Index(name="email_idx", columnList = "email", unique = true), // @Index(name="displayName_idx", columnList = "display_name") }) // public class Us...
import yourwebproject2.model.entity.User; import javax.persistence.*; import java.io.Serializable;
package yourwebproject2.unusedspringsecurity; /** * @author: kameshr */ //@Entity //@Table(indexes = { @Index(name="email_fk_idx", columnList = "email", unique = true) }) public class UserRole implements Serializable { private Integer userRoleId;
// Path: src/main/java/yourwebproject2/model/entity/User.java // @Entity // @Inheritance(strategy = InheritanceType.SINGLE_TABLE) // @Table(indexes = { @Index(name="email_idx", columnList = "email", unique = true), // @Index(name="displayName_idx", columnList = "display_name") }) // public class Us...
private User user;
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/model/entity/User.java
// Path: src/main/java/yourwebproject2/framework/data/JPAEntity.java // @MappedSuperclass // public abstract class JPAEntity<T extends Serializable> implements Entity { // protected T id; // protected Date createdAt; // protected Date updatedAt; // // // public JPAEntity() { // createdAt = ne...
import com.fasterxml.jackson.annotation.JsonIgnore; import yourwebproject2.framework.data.JPAEntity; import org.hibernate.validator.constraints.Email; import org.hibernate.validator.constraints.NotBlank; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import javax.persistence.*; import javax.va...
package yourwebproject2.model.entity; /** * Created by Y.Kamesh on 10/9/2015. */ @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @Table(indexes = { @Index(name="email_idx", columnList = "email", unique = true), @Index(name="displayName_idx", columnList = "display_name") })
// Path: src/main/java/yourwebproject2/framework/data/JPAEntity.java // @MappedSuperclass // public abstract class JPAEntity<T extends Serializable> implements Entity { // protected T id; // protected Date createdAt; // protected Date updatedAt; // // // public JPAEntity() { // createdAt = ne...
public class User extends JPAEntity<Long> implements Serializable {
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/interceptor/WebAppExceptionAdvice.java
// Path: src/main/java/yourwebproject2/framework/api/APIResponse.java // @JsonInclude(JsonInclude.Include.NON_NULL) // public class APIResponse { // public static final String API_RESPONSE = "apiResponse"; // Object result; // String time; // long code; // // public static class ExceptionAPIRespons...
import yourwebproject2.framework.api.APIResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody;
package yourwebproject2.interceptor; /** * Exception Handler Controller Advice to catch all controller exceptions and respond gracefully to * the caller * * Created by Y.Kamesh on 8/2/2015. */ @ControllerAdvice public class WebAppExceptionAdvice { private static Logger LOG = LoggerFactory.getLogger(WebAppExc...
// Path: src/main/java/yourwebproject2/framework/api/APIResponse.java // @JsonInclude(JsonInclude.Include.NON_NULL) // public class APIResponse { // public static final String API_RESPONSE = "apiResponse"; // Object result; // String time; // long code; // // public static class ExceptionAPIRespons...
public APIResponse handleAnyException(Exception e) {
wesleyegberto/java-new-features
java-8/src/main/java/com/github/wesleyegberto/map/StreamFilterTest.java
// Path: java-8/src/main/java/com/github/wesleyegberto/model/Person.java // public class Person { // private String name; // private int age; // // public Person(String name, int age) { // this.name = name; // this.age = age; // } // // public String getName() { // return name; // } // // public int get...
import com.github.wesleyegberto.model.Person; import java.util.*; import java.util.stream.Stream;
package com.github.wesleyegberto.map; public class StreamFilterTest { public static void main(String[] args) {
// Path: java-8/src/main/java/com/github/wesleyegberto/model/Person.java // public class Person { // private String name; // private int age; // // public Person(String name, int age) { // this.name = name; // this.age = age; // } // // public String getName() { // return name; // } // // public int get...
List<Person> persons = Person.getList();
wesleyegberto/java-new-features
java-8/src/main/java/com/github/wesleyegberto/map/StreamMapTest.java
// Path: java-8/src/main/java/com/github/wesleyegberto/model/Person.java // public class Person { // private String name; // private int age; // // public Person(String name, int age) { // this.name = name; // this.age = age; // } // // public String getName() { // return name; // } // // public int get...
import java.util.*; import java.util.stream.Stream; import java.util.function.Function; // map operations -> transformations import com.github.wesleyegberto.model.Person; import com.github.wesleyegberto.model.Warrior;
package com.github.wesleyegberto.map; public class StreamMapTest { public static void main(String[] args) {
// Path: java-8/src/main/java/com/github/wesleyegberto/model/Person.java // public class Person { // private String name; // private int age; // // public Person(String name, int age) { // this.name = name; // this.age = age; // } // // public String getName() { // return name; // } // // public int get...
List<Person> persons = Person.getList();
wesleyegberto/java-new-features
java-8/src/main/java/com/github/wesleyegberto/map/StreamMapTest.java
// Path: java-8/src/main/java/com/github/wesleyegberto/model/Person.java // public class Person { // private String name; // private int age; // // public Person(String name, int age) { // this.name = name; // this.age = age; // } // // public String getName() { // return name; // } // // public int get...
import java.util.*; import java.util.stream.Stream; import java.util.function.Function; // map operations -> transformations import com.github.wesleyegberto.model.Person; import com.github.wesleyegberto.model.Warrior;
package com.github.wesleyegberto.map; public class StreamMapTest { public static void main(String[] args) { List<Person> persons = Person.getList(); System.out.println("Map operation using anonymous inner class: ");
// Path: java-8/src/main/java/com/github/wesleyegberto/model/Person.java // public class Person { // private String name; // private int age; // // public Person(String name, int age) { // this.name = name; // this.age = age; // } // // public String getName() { // return name; // } // // public int get...
Stream<Warrior> warriors = persons.stream()
jameskennard/mockito-collections
mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/inject/InjectionDetails.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
import java.util.Collection; import java.util.Collections; import java.util.Set; import org.mockito.Mock; import uk.co.webamoeba.mockito.collections.util.OrderedSet;
package uk.co.webamoeba.mockito.collections.inject; /** * Describes {@link Object}s that we want to inject into and be injected with {@link Collection}s of {@link Mock Mocks}. * * @author James Kennard */ public class InjectionDetails { private Set<Object> injectCollections;
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
private OrderedSet<Object> mocks;
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionsOfMocksIntoInheritedCollectionsStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import java.util.Iterator; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import uk.co.webamoeba.mockito.collections.MockitoCol...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionsOfMocksIntoInheritedCollectionsStoryIntegrationTest implements InjectCollectionsOfMocksIntoInheritedCollectionsStory { @Test public void objectUnderTestInheritsCollectionOfCollaborators() { // Given
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
final ClassWithInheritedCollectionOfCollaborators outerObjectUnderTest = new ClassWithInheritedCollectionOfCollaborators();
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionsOfMocksIntoInheritedCollectionsStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import java.util.Iterator; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import uk.co.webamoeba.mockito.collections.MockitoCol...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionsOfMocksIntoInheritedCollectionsStoryIntegrationTest implements InjectCollectionsOfMocksIntoInheritedCollectionsStory { @Test public void objectUnderTestInheritsCollectionOfCollaborators() { // Given final Clas...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(exampleTest);
jameskennard/mockito-collections
mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/internal/VerifierTest.java
// Path: mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/support/ThrowableCausedByMatcher.java // public class ThrowableCausedByMatcher extends BaseMatcher<Throwable> { // // private Class<? extends Throwable> causedByClass; // // public ThrowableCausedByMatcher(Class<? extends Throwable>...
import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Arrays; import java.util.Collection; import java.util.Collections; impor...
package uk.co.webamoeba.mockito.collections.internal; /** * @author James Kennard */ public class VerifierTest { private Verifier verification = new Verifier(); @Rule public ExpectedException thrown = ExpectedException.none(); @Test public void shouldCollectiveVerifyGivenWantedButNotInvoked() throws IOEx...
// Path: mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/support/ThrowableCausedByMatcher.java // public class ThrowableCausedByMatcher extends BaseMatcher<Throwable> { // // private Class<? extends Throwable> causedByClass; // // public ThrowableCausedByMatcher(Class<? extends Throwable>...
thrown.expect(new ThrowableCausedByMatcher(WantedButNotInvoked.class));
jameskennard/mockito-collections
mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/inject/DefaultMockSelectionStrategy.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
import java.util.Collection; import uk.co.webamoeba.mockito.collections.util.OrderedSet;
package uk.co.webamoeba.mockito.collections.inject; /** * The default implementation of {@link MockSelectionStrategy}. * * @author James Kennard */ public class DefaultMockSelectionStrategy implements MockSelectionStrategy { @SuppressWarnings("unchecked")
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
public <T> OrderedSet<T> selectMocks(OrderedSet<Object> mocks, Class<T> mockClass) {
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionOfInheritedMocksStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import java.util.Iterator; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import ...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionOfInheritedMocksStoryIntegrationTest implements InjectCollectionOfInheritedMocksStory { @Test public void testClassInheritsSomeMocksFromAParentTestClass() { // Given
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
final ClassWithCollectionOfCollaborators outerCUT = new ClassWithCollectionOfCollaborators();
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionOfInheritedMocksStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import java.util.Iterator; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Mock; import ...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionOfInheritedMocksStoryIntegrationTest implements InjectCollectionOfInheritedMocksStory { @Test public void testClassInheritsSomeMocksFromAParentTestClass() { // Given final ClassWithCollectionOfCollaborators out...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(exampleTest);
jameskennard/mockito-collections
mockito-collections-samples/src/test/java/uk/co/webamoeba/mockito/collections/sample/ListenerManagerAlternativeTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import java.util.Collection; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.runners.MockitoJUnitRunner; import uk.co.webamoeba.mockito.collections.MockitoCollections; import uk.co.webamoeba.mockito.collections.annotation.CollectionOfMo...
package uk.co.webamoeba.mockito.collections.sample; /** * This test shows how you can use Mockito Collections to test where there is a {@link Collection} of delegates that do * not return values. Comments are included throughout the file to hellp clarify what's going on. * * @author James Kennard */ @RunWith(...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(this);
jameskennard/mockito-collections
mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/inject/DefaultMockSelectionStrategyTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import java.io.FileInputStream; import java.io.FileOutputStrea...
package uk.co.webamoeba.mockito.collections.inject; /** * @author James Kennard */ public class DefaultMockSelectionStrategyTest { private DefaultMockSelectionStrategy strategy = new DefaultMockSelectionStrategy(); @Test public void shouldGetMocks() { // Given InputStream mock1 = mock(InputStream.class)...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
OrderedSet<Object> mocks = new OrderedSet<Object>(Arrays.<Object> asList(mock1, mock2, mock3));
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionOfMocksAnnotatedFieldsStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.Collection; import java.util.EventListener; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.internal.util.MockUtil; import uk.co.webamoeba.mockito.collections.MockitoCollections; import uk....
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionOfMocksAnnotatedFieldsStoryIntegrationTest implements InjectCollectionOfMocksAnnotatedFieldsStory { @Test public void objectUnderTestHasCollectionOfCollaborators() { // Given ExampleTest test = new ExampleTest(...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
test.objectUnderTest = new ClassWithCollectionOfCollaborators();
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionOfMocksAnnotatedFieldsStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.Collection; import java.util.EventListener; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.internal.util.MockUtil; import uk.co.webamoeba.mockito.collections.MockitoCollections; import uk....
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionOfMocksAnnotatedFieldsStoryIntegrationTest implements InjectCollectionOfMocksAnnotatedFieldsStory { @Test public void objectUnderTestHasCollectionOfCollaborators() { // Given ExampleTest test = new ExampleTest(...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(test);
jameskennard/mockito-collections
mockito-collections-samples/src/test/java/uk/co/webamoeba/mockito/collections/sample/HandlerManagerAlterantiveTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertArrayEquals; import static org.mockito.BDDMockito.given; import java.util.Set; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import uk.co.webamo...
package uk.co.webamoeba.mockito.collections.sample; /** * This test shows how you can use Mockito Collections to deal simply with a {@link Set} of delegates that return * values. Comments are included throughout the file to hellp clarify what's going on. * * @author James Kennard */ @RunWith(MockitoJUnitRunn...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(this);
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/DoNotInjectIgnoredMocksIntoCollectionsStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import org.junit.Test; import org.mockito.InjectMocks; import org.mocki...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class DoNotInjectIgnoredMocksIntoCollectionsStoryIntegrationTest implements DoNotInjectIgnoredMocksIntoCollectionsStory { @Test public void allMocksHaveTheIgnoreForCollectionsAnnotation() { // Given
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
final ClassWithCollectionOfCollaborators outerObjectUnderTest = new ClassWithCollectionOfCollaborators();
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/DoNotInjectIgnoredMocksIntoCollectionsStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import org.junit.Test; import org.mockito.InjectMocks; import org.mocki...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class DoNotInjectIgnoredMocksIntoCollectionsStoryIntegrationTest implements DoNotInjectIgnoredMocksIntoCollectionsStory { @Test public void allMocksHaveTheIgnoreForCollectionsAnnotation() { // Given final ClassWithCollectionOfCollab...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(exampleTest);
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionsOfMatchingMocksStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import java.util.EventListenerProxy; import java.util.Iterator; import org.junit.Test; import org.mockito.InjectMocks...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionsOfMatchingMocksStoryIntegrationTest implements InjectCollectionsOfMatchingMocksStory { @Test public void testHasMocksOfSameType() { // Given
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
final ClassWithCollectionOfCollaborators outerObjectUnderTest = new ClassWithCollectionOfCollaborators();
jameskennard/mockito-collections
mockito-collections-core-integration-tests/src/test/java/uk/co/webamoeba/mockito/collections/core/integrationtests/InjectCollectionsOfMatchingMocksStoryIntegrationTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.mockito.Mockito.mock; import java.util.EventListener; import java.util.EventListenerProxy; import java.util.Iterator; import org.junit.Test; import org.mockito.InjectMocks...
package uk.co.webamoeba.mockito.collections.core.integrationtests; public class InjectCollectionsOfMatchingMocksStoryIntegrationTest implements InjectCollectionsOfMatchingMocksStory { @Test public void testHasMocksOfSameType() { // Given final ClassWithCollectionOfCollaborators outerObjectUnderTest = new Cl...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/MockitoCollections.java // public class MockitoCollections { // // private static Initialiser INITIALISER = new Initialiser(); // // private static Verifier VERIFIER = new Verifier(); // // /** // * {@link Initialiser#initialise...
MockitoCollections.initialise(exampleTest);
jameskennard/mockito-collections
mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/inject/CollectionFactoryTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.AbstractCollection; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Queue; import java.util.Set; import java.util....
package uk.co.webamoeba.mockito.collections.inject; /** * @author James Kennard */ @SuppressWarnings("unchecked") public class CollectionFactoryTest { private CollectionFactory factory = new CollectionFactory(); private MockUtil mockUtil = new MockUtil(); @Test public void shouldCreateCollectionGivenColle...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
shouldCreateCollection(SortedSet.class, new OrderedSet<Object>(Arrays.<Object> asList("ABC", "DEF", "GHI")));
jameskennard/mockito-collections
mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/util/FieldValueMutatorTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/exception/MockitoCollectionsException.java // public class MockitoCollectionsException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public MockitoCollectionsException(String message, Throwa...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Mockito.mock; import java.lang.reflect.Field; import java.util.Collection; import org.junit.Test; import uk.co.webamoeba.mock...
assertTrue(field.isAccessible()); } @Test public void shouldSetGivenPrivateField() { // Given Field field = getField("privateCollection"); FieldValueMutator mutator = new FieldValueMutator(support, field); Object value = mock(Collection.class); // When mutator.mutateTo(value); // Then assertEqua...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/exception/MockitoCollectionsException.java // public class MockitoCollectionsException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public MockitoCollectionsException(String message, Throwa...
} catch (MockitoCollectionsException e) {
jameskennard/mockito-collections
mockito-collections-core/src/test/java/uk/co/webamoeba/mockito/collections/inject/InjectionDetailsTest.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import java.util.Collections; import java.util.Set; import org.junit.Test; import uk.co.webamoeba.mockito.collections.util.OrderedSet;
package uk.co.webamoeba.mockito.collections.inject; /** * @author James Kennard */ @SuppressWarnings("unchecked") public class InjectionDetailsTest { @Test public void shouldGetInjectCollections() { // Given Object injectCollections = "Some InjectCollections"; Set<Object> setOfInjectCollections = Collec...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/OrderedSet.java // public class OrderedSet<E> implements Set<E> { // // private LinkedHashSet<E> set; // // public OrderedSet() { // this.set = new LinkedHashSet<E>(); // } // // public OrderedSet(Collection<E> set) { // ...
OrderedSet<Object> mocks = new OrderedSet<Object>();
jameskennard/mockito-collections
mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/util/FieldValueMutator.java
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/exception/MockitoCollectionsException.java // public class MockitoCollectionsException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public MockitoCollectionsException(String message, Throwa...
import java.lang.reflect.Field; import uk.co.webamoeba.mockito.collections.exception.MockitoCollectionsException;
package uk.co.webamoeba.mockito.collections.util; /** * Utility class that can be used to mutate the value of a field. <i>Based on Mockito's FieldSetter</i>. * * @author James Kennard */ public class FieldValueMutator { private Object object; private Field field; public FieldValueMutator(Object object, Fi...
// Path: mockito-collections-core/src/main/java/uk/co/webamoeba/mockito/collections/exception/MockitoCollectionsException.java // public class MockitoCollectionsException extends RuntimeException { // // private static final long serialVersionUID = 1L; // // public MockitoCollectionsException(String message, Throwa...
throw new MockitoCollectionsException("Could not set field '" + field + "' on object '" + object
webinos/Webinos-Platform
webinos/platform/android/impl/src/org/webinos/impl/nfc/NfcManager.java
// Path: webinos/platform/android/impl/src/org/webinos/impl/nfc/NfcManager.java // enum FilterType { // UNKNOWN, TEXT, URI, MIME // }
import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.webinos.impl.nfc.NfcManager.NfcDiscoveryFilter.FilterType; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Parcelable...
super(); this.ctx = ctx; ctx.registerReceiver(this, new IntentFilter(ACTION_DISPATCH_NFC)); } static interface NfcDiscoveryListener { void onTagDiscovered(Object tag); } private List<NfcDiscoveryListener> mListeners = new ArrayList<NfcDiscoveryListener>(); private Object mListenerLock = new ...
// Path: webinos/platform/android/impl/src/org/webinos/impl/nfc/NfcManager.java // enum FilterType { // UNKNOWN, TEXT, URI, MIME // } // Path: webinos/platform/android/impl/src/org/webinos/impl/nfc/NfcManager.java import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.webinos.imp...
enum FilterType {
lihengming/java-codes
socket/src/main/java/rpc/RpcTest.java
// Path: socket/src/main/java/rpc/SimpleRpcFramework.java // public static void export(Object serviceImpl, int port) { // try { // try (ServerSocket server = new ServerSocket(port)) { // while (!Thread.currentThread().isInterrupted()) { // Socket socket = server.accept(); // ...
import java.util.concurrent.TimeUnit; import static rpc.SimpleRpcFramework.export; import static rpc.SimpleRpcFramework.use;
package rpc; /** * Created by 李恒名 on 2017/8/17. */ public class RpcTest { private static final String HOST = "localhost"; private static final int PORT = 8888; interface ComputeService { int sum(int a, int b); } static class ComputeServiceImpl implements ComputeService { @Ov...
// Path: socket/src/main/java/rpc/SimpleRpcFramework.java // public static void export(Object serviceImpl, int port) { // try { // try (ServerSocket server = new ServerSocket(port)) { // while (!Thread.currentThread().isInterrupted()) { // Socket socket = server.accept(); // ...
export(new ComputeServiceImpl(), PORT);
lihengming/java-codes
socket/src/main/java/rpc/RpcTest.java
// Path: socket/src/main/java/rpc/SimpleRpcFramework.java // public static void export(Object serviceImpl, int port) { // try { // try (ServerSocket server = new ServerSocket(port)) { // while (!Thread.currentThread().isInterrupted()) { // Socket socket = server.accept(); // ...
import java.util.concurrent.TimeUnit; import static rpc.SimpleRpcFramework.export; import static rpc.SimpleRpcFramework.use;
package rpc; /** * Created by 李恒名 on 2017/8/17. */ public class RpcTest { private static final String HOST = "localhost"; private static final int PORT = 8888; interface ComputeService { int sum(int a, int b); } static class ComputeServiceImpl implements ComputeService { @Ov...
// Path: socket/src/main/java/rpc/SimpleRpcFramework.java // public static void export(Object serviceImpl, int port) { // try { // try (ServerSocket server = new ServerSocket(port)) { // while (!Thread.currentThread().isInterrupted()) { // Socket socket = server.accept(); // ...
ComputeService computeService = use(ComputeService.class, HOST, PORT);
aredee/accumulo-mesos
accumulo-mesos-executor/src/main/java/aredee/mesos/frameworks/accumulo/executor/Main.java
// Path: accumulo-mesos-common/src/main/java/aredee/mesos/frameworks/accumulo/configuration/Environment.java // public class Environment { // // public static final String JAVA_HOME = "JAVA_HOME"; // // public static final String CLASSPATH = "CLASSPATH"; // // public static final String HADOOP_PREFIX = "...
import aredee.mesos.frameworks.accumulo.configuration.Environment; import org.apache.mesos.ExecutorDriver; import org.apache.mesos.MesosExecutorDriver; import org.apache.mesos.Protos; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.List;
package aredee.mesos.frameworks.accumulo.executor; public class Main { private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); public static void main(String[] args){ //TODO Should executors have REST API? // TODO check for required environment variables
// Path: accumulo-mesos-common/src/main/java/aredee/mesos/frameworks/accumulo/configuration/Environment.java // public class Environment { // // public static final String JAVA_HOME = "JAVA_HOME"; // // public static final String CLASSPATH = "CLASSPATH"; // // public static final String HADOOP_PREFIX = "...
List<String> missingVars = Environment.getMissingVariables(Environment.REQUIRED_EXECUTOR_VARS);
aredee/accumulo-mesos
accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/ApiServiceFactory.java
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
import aredee.mesos.frameworks.accumulo.framework.api.impl.ClusterApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.ConfigApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.DefaultApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.StatusApiService...
package aredee.mesos.frameworks.accumulo.framework.api; public final class ApiServiceFactory { public static final ClusterApiService getClusterApi(){
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
return new ClusterApiServiceImpl();
aredee/accumulo-mesos
accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/ApiServiceFactory.java
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
import aredee.mesos.frameworks.accumulo.framework.api.impl.ClusterApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.ConfigApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.DefaultApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.StatusApiService...
package aredee.mesos.frameworks.accumulo.framework.api; public final class ApiServiceFactory { public static final ClusterApiService getClusterApi(){ return new ClusterApiServiceImpl(); } public static final ConfigApiService getConfigApi(){
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
return new ConfigApiServiceImpl();
aredee/accumulo-mesos
accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/ApiServiceFactory.java
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
import aredee.mesos.frameworks.accumulo.framework.api.impl.ClusterApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.ConfigApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.DefaultApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.StatusApiService...
package aredee.mesos.frameworks.accumulo.framework.api; public final class ApiServiceFactory { public static final ClusterApiService getClusterApi(){ return new ClusterApiServiceImpl(); } public static final ConfigApiService getConfigApi(){ return new ConfigApiServiceImpl(); } p...
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
return new DefaultApiServiceImpl();
aredee/accumulo-mesos
accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/ApiServiceFactory.java
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
import aredee.mesos.frameworks.accumulo.framework.api.impl.ClusterApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.ConfigApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.DefaultApiServiceImpl; import aredee.mesos.frameworks.accumulo.framework.api.impl.StatusApiService...
package aredee.mesos.frameworks.accumulo.framework.api; public final class ApiServiceFactory { public static final ClusterApiService getClusterApi(){ return new ClusterApiServiceImpl(); } public static final ConfigApiService getConfigApi(){ return new ConfigApiServiceImpl(); } p...
// Path: accumulo-mesos-framework/src/main/java/aredee/mesos/frameworks/accumulo/framework/api/impl/ClusterApiServiceImpl.java // public class ClusterApiServiceImpl extends ClusterApiService { // // Cluster cluster = Cluster.INSTANCE; // // @Override // public Response clusterKillPost() throws NotFoundExc...
return new StatusApiServiceImpl();
aredee/accumulo-mesos
accumulo-mesos-common/src/main/java/aredee/mesos/frameworks/accumulo/process/AccumuloProcessFactory.java
// Path: accumulo-mesos-common/src/main/java/aredee/mesos/frameworks/accumulo/configuration/Environment.java // public class Environment { // // public static final String JAVA_HOME = "JAVA_HOME"; // // public static final String CLASSPATH = "CLASSPATH"; // // public static final String HADOOP_PREFIX = "...
import aredee.mesos.frameworks.accumulo.configuration.Environment; import com.google.common.base.Joiner; import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.impl.VFSClassLoader; import org.slf4j.Logger; import org....
package aredee.mesos.frameworks.accumulo.process; public class AccumuloProcessFactory { private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloProcessFactory.class); private List<LogWriter> logWriters = new ArrayList<>(5); private List<Process> cleanup = new ArrayList<>(); private Map<...
// Path: accumulo-mesos-common/src/main/java/aredee/mesos/frameworks/accumulo/configuration/Environment.java // public class Environment { // // public static final String JAVA_HOME = "JAVA_HOME"; // // public static final String CLASSPATH = "CLASSPATH"; // // public static final String HADOOP_PREFIX = "...
putProcessEnv(Environment.CLASSPATH, classpath);
KoperGroup/koper
koper-testcase/src/main/java/koper/event/OrderAsyncListener.java
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/Order.java // public class Order { // // public String orderId; // public String orderName; // public Date createDate; // public String memberId; // public BigDecimal totalPrice; // // public String getOrderId() { // return orderId; // } // pub...
import com.alibaba.fastjson.JSON; import koper.demo.trading.mapper.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import java.util.List;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/Order.java // public class Order { // // public String orderId; // public String orderName; // public Date createDate; // public String memberId; // public BigDecimal totalPrice; // // public String getOrderId() { // return orderId; // } // pub...
Order order = JSON.parseObject( args.get(1).toString(),Order.class);
KoperGroup/koper
koper-core/src/main/java/koper/client/MessageReceiver.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry; import koper.MessageCenter; import java.util.Properties;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
void setListenerRegistry(ListenerRegistry listenerRegistry);
KoperGroup/koper
koper-core/src/main/java/koper/client/MessageReceiver.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry; import koper.MessageCenter; import java.util.Properties;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
void setMessageCenter(MessageCenter messageCenter);
KoperGroup/koper
koper-testcase/src/main/java/koper/event/binding/MemberListener.java
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phone; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // thi...
import koper.demo.member.mapper.Member; import koper.event.DataEvent; import koper.event.DataListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import java.math.BigDecimal;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phone; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // thi...
public void onCancelMember(Integer id, Member member) {
KoperGroup/koper
koper-testcase/src/main/java/koper/event/binding/MemberListener.java
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phone; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // thi...
import koper.demo.member.mapper.Member; import koper.event.DataEvent; import koper.event.DataListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import java.math.BigDecimal;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phone; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // thi...
public void onDeleteMember(DataEvent dataEvent) {
KoperGroup/koper
koper-core/src/main/java/koper/MessageCenter.java
// Path: koper-core/src/main/java/koper/router/Router.java // public interface Router { // // /** // * register dispatcher thread 's mail box here, mq receiver will dispatch {@Link MsgBean} to mail box // * // * @param thread which thread's main box // * @param mailBox dispatcher thread 's loc...
import koper.router.Router;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/router/Router.java // public interface Router { // // /** // * register dispatcher thread 's mail box here, mq receiver will dispatch {@Link MsgBean} to mail box // * // * @param thread which thread's main box // * @param mailBox dispatcher thread 's loc...
Router getRouter();
KoperGroup/koper
koper-reactor/src/test/java/koper/reactor/demo/CustomerApp.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import koper.client.ConsumerLauncher;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
ConsumerLauncher consumerLauncher = context.getBean(ConsumerLauncher.class);
KoperGroup/koper
koper-demo/src/main/java/koper/demo/performance/KafkaReceiverPerf.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import koper.client.ConsumerLauncher; import koper.demo.dataevent.listener.OrderListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
OrderListener listener = context.getBean(OrderListener.class);
KoperGroup/koper
koper-demo/src/main/java/koper/demo/performance/KafkaReceiverPerf.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import koper.client.ConsumerLauncher; import koper.demo.dataevent.listener.OrderListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
final ConsumerLauncher consumerLauncher = context.getBean(ConsumerLauncher.class);
KoperGroup/koper
koper-reactor/src/test/java/koper/reactor/demo/Digger.java
// Path: koper-reactor/src/main/java/koper/reactor/Reactor.java // public abstract class Reactor extends AbstractMessageListener implements Identifieable { // // private String id; // /** // * @param id the id to set // */ // @Override // public void setId(String id) { // this.id = id; // } // // /** //...
import org.springframework.stereotype.Component; import koper.Listen; import koper.reactor.Reactor;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-reactor/src/main/java/koper/reactor/Reactor.java // public abstract class Reactor extends AbstractMessageListener implements Identifieable { // // private String id; // /** // * @param id the id to set // */ // @Override // public void setId(String id) { // this.id = id; // } // // /** //...
public class Digger extends Reactor {
KoperGroup/koper
koper-testcase/src/test/java/koper/kafka/OrderListenerTestCase.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import koper.AbstractMessageListener; import koper.Listen; import koper.demo.trading.mapper.Order; import koper.sender.MessageSender; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.slf...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
public class OrderListenerTestCase extends AbstractMessageListener {
KoperGroup/koper
koper-testcase/src/test/java/koper/kafka/OrderListenerTestCase.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import koper.AbstractMessageListener; import koper.Listen; import koper.demo.trading.mapper.Order; import koper.sender.MessageSender; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.slf...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
private MessageSender messageSender;
KoperGroup/koper
koper-testcase/src/test/java/koper/kafka/OrderListenerTestCase.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import koper.AbstractMessageListener; import koper.Listen; import koper.demo.trading.mapper.Order; import koper.sender.MessageSender; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.slf...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
private Order expectOrder;
KoperGroup/koper
koper-core/src/main/java/koper/client/ConsumerLauncher.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
public ListenerRegistry getListenerRegistry();
KoperGroup/koper
koper-testcase/src/main/java/koper/demo/trading/mapper/impl/OrderMapperImpl.java
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/OrderMapper.java // public interface OrderMapper { // // String getOrder(String orderId, Order order); // // String cancelOrder(Order order); // // String createOrder(String memberId, Order order); // // String updateOrder(Order order);...
import koper.aop.SendMessageAfter; import koper.aop.SendMessageBefore; import koper.demo.trading.mapper.OrderMapper; import koper.demo.trading.mapper.Order; import org.springframework.stereotype.Component;
package koper.demo.trading.mapper.impl; /** * @author kk * @since 1.0 */ @Component public class OrderMapperImpl implements OrderMapper { /** * 方法调用前发送数据消息 */ @SendMessageBefore(topic = "Order.onBeforeCreateOrder")
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/OrderMapper.java // public interface OrderMapper { // // String getOrder(String orderId, Order order); // // String cancelOrder(Order order); // // String createOrder(String memberId, Order order); // // String updateOrder(Order order);...
public String createOrder(String memberId, Order order) {
KoperGroup/koper
koper-reactor/src/test/java/koper/reactor/demo/ProducerApp.java
// Path: koper-reactor/src/main/java/koper/reactor/ReactorRef.java // public class ReactorRef { // // private long id; // private Class<? extends Reactor> reactorClass; // public MessageSender messageSender; // // private static final Random rd = new Random(); // /** // * // */ // private ReactorRef(Class...
import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import koper.reactor.ReactorRef; import koper.sender.MessageSender; import scala.util.Random;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-reactor/src/main/java/koper/reactor/ReactorRef.java // public class ReactorRef { // // private long id; // private Class<? extends Reactor> reactorClass; // public MessageSender messageSender; // // private static final Random rd = new Random(); // /** // * // */ // private ReactorRef(Class...
MessageSender messageSender = (MessageSender) context.getBean("messageSender");
KoperGroup/koper
koper-reactor/src/test/java/koper/reactor/demo/ProducerApp.java
// Path: koper-reactor/src/main/java/koper/reactor/ReactorRef.java // public class ReactorRef { // // private long id; // private Class<? extends Reactor> reactorClass; // public MessageSender messageSender; // // private static final Random rd = new Random(); // /** // * // */ // private ReactorRef(Class...
import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import koper.reactor.ReactorRef; import koper.sender.MessageSender; import scala.util.Random;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-reactor/src/main/java/koper/reactor/ReactorRef.java // public class ReactorRef { // // private long id; // private Class<? extends Reactor> reactorClass; // public MessageSender messageSender; // // private static final Random rd = new Random(); // /** // * // */ // private ReactorRef(Class...
ReactorRef ref = ReactorRef.create(Digger.class);
KoperGroup/koper
koper-testcase/src/main/java/koper/demo/member/mapper/impl/MemberMapperImpl.java
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phone; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // thi...
import koper.demo.member.mapper.Member; import koper.demo.member.mapper.MemberMapper; import org.springframework.stereotype.Repository; import java.math.BigDecimal;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-testcase/src/main/java/koper/demo/member/mapper/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phone; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // thi...
public String cancelMember(Integer id, Member member) {
KoperGroup/koper
koper-core/src/main/java/koper/client/MessageReceiverThread.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry; import koper.MessageCenter; import java.util.Properties;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
private MessageCenter messageCenter;
KoperGroup/koper
koper-core/src/main/java/koper/client/MessageReceiverThread.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry; import koper.MessageCenter; import java.util.Properties;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
private ListenerRegistry listenerRegistry;
KoperGroup/koper
koper-demo/src/main/java/koper/demo/dataevent/service/impl/OrderServiceImpl.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/service/OrderService.java // public interface OrderService { // // String insertOrder(Order order); // // void updateOrder(Order order); // } // // Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // p...
import koper.demo.dataevent.service.OrderService; import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.mapper.OrderMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/service/OrderService.java // public interface OrderService { // // String insertOrder(Order order); // // void updateOrder(Order order); // } // // Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // p...
private OrderMapper orderMapper;
KoperGroup/koper
koper-demo/src/main/java/koper/demo/dataevent/service/impl/OrderServiceImpl.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/service/OrderService.java // public interface OrderService { // // String insertOrder(Order order); // // void updateOrder(Order order); // } // // Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // p...
import koper.demo.dataevent.service.OrderService; import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.mapper.OrderMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/service/OrderService.java // public interface OrderService { // // String insertOrder(Order order); // // void updateOrder(Order order); // } // // Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // p...
public String insertOrder(Order order) {
KoperGroup/koper
koper-testcase/src/test/java/koper/kafka/KafkaReceiverTest.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import koper.client.ConsumerLauncher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
final ConsumerLauncher consumerLauncher = context.getBean(ConsumerLauncher.class);
KoperGroup/koper
koper-reactor/src/main/java/koper/reactor/ReactorRef.java
// Path: koper-core/src/main/java/koper/sender/MessageSender.java // public interface MessageSender { // // void send(String topic, String msg); // // void send(String topic, String key, String msg); // // void send(String topic, Object msg); // // void send(String topic, String key, Object msg); //...
import java.util.Random; import koper.sender.MessageSender;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/sender/MessageSender.java // public interface MessageSender { // // void send(String topic, String msg); // // void send(String topic, String key, String msg); // // void send(String topic, Object msg); // // void send(String topic, String key, Object msg); //...
public MessageSender messageSender;
KoperGroup/koper
koper-dataevent/src/main/java/koper/event/AbstractDataEventListener.java
// Path: koper-core/src/main/java/koper/MsgBean.java // public class MsgBean<K, V> implements Serializable { // // private static final long serialVersionUID = -4387811273059946901L; // // private String topic; // private K key; // private V value; // private String valueType; // // private D...
import koper.MsgBean; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/MsgBean.java // public class MsgBean<K, V> implements Serializable { // // private static final long serialVersionUID = -4387811273059946901L; // // private String topic; // private K key; // private V value; // private String valueType; // // private D...
public void onMsgBean(MsgBean<String, String> msgBean) {
KoperGroup/koper
koper-demo/src/main/java/koper/demo/main/SendDataEventMsgDemo.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.service.OrderService; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
Order order = new Order();
KoperGroup/koper
koper-demo/src/main/java/koper/demo/main/SendDataEventMsgDemo.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.service.OrderService; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
OrderService orderService = (OrderService) context.getBean("orderServiceImpl");
KoperGroup/koper
koper-demo/src/main/java/koper/demo/dataevent/mapper/impl/OrderMapperImpl.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.mapper.OrderMapper; import org.springframework.stereotype.Repository;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
public Integer insertOrder(Order order) {
KoperGroup/koper
koper-demo/src/main/java/koper/demo/main/KafkaReceiverDemo.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import koper.client.ConsumerLauncher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
final ConsumerLauncher consumerLauncher = context.getBean(ConsumerLauncher.class);
KoperGroup/koper
koper-testcase/src/main/java/koper/listener/DemoListener1.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import koper.AbstractMessageListener; import koper.Listen; import koper.demo.trading.mapper.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
Order order = JSON.parseObject(argArray.getString(0), Order.class);
KoperGroup/koper
koper-testcase/src/main/java/koper/event/OrderLogListener.java
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/Order.java // public class Order { // // public String orderId; // public String orderName; // public Date createDate; // public String memberId; // public BigDecimal totalPrice; // // public String getOrderId() { // return orderId; // } // pub...
import com.alibaba.fastjson.JSON; import koper.demo.trading.mapper.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import java.util.List;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/Order.java // public class Order { // // public String orderId; // public String orderName; // public Date createDate; // public String memberId; // public BigDecimal totalPrice; // // public String getOrderId() { // return orderId; // } // pub...
Order order = JSON.parseObject( args.get(0).toString(),Order.class);
KoperGroup/koper
koper-demo/src/main/java/koper/demo/message/listener/MemberSignupListener.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import koper.AbstractMessageListener; import koper.Listen; import koper.demo.message.service.SmsService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
private SmsService smsService;
KoperGroup/koper
koper-dataevent/src/main/java/koper/event/DefaultDataEvent.java
// Path: koper-core/src/main/java/koper/MsgBean.java // public class MsgBean<K, V> implements Serializable { // // private static final long serialVersionUID = -4387811273059946901L; // // private String topic; // private K key; // private V value; // private String valueType; // // private D...
import koper.MsgBean; import java.util.List;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/MsgBean.java // public class MsgBean<K, V> implements Serializable { // // private static final long serialVersionUID = -4387811273059946901L; // // private String topic; // private K key; // private V value; // private String valueType; // // private D...
private MsgBean<String, String> msgBean;
KoperGroup/koper
koper-demo/src/main/java/koper/demo/performance/SendDataEventMsgPerf.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.service.OrderService; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
Order order = new Order();
KoperGroup/koper
koper-demo/src/main/java/koper/demo/performance/SendDataEventMsgPerf.java
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
import koper.demo.dataevent.entity.Order; import koper.demo.dataevent.service.OrderService; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/dataevent/entity/Order.java // public class Order { // // private Integer id; // // private String orderNo; // // private String createdTime; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // ...
OrderService orderService = (OrderService) context.getBean("orderServiceImpl");
KoperGroup/koper
koper-core/src/main/java/koper/client/MessageDispatcherThread.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry; import koper.MessageCenter; import koper.MessageDispatcher;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
private ListenerRegistry listenerRegistry;
KoperGroup/koper
koper-core/src/main/java/koper/client/MessageDispatcherThread.java
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
import koper.ListenerRegistry; import koper.MessageCenter; import koper.MessageDispatcher;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/ListenerRegistry.java // public class ListenerRegistry { // // private Map<String, Object> listenerMap = new ConcurrentHashMap<>(); // // /** // * 注册监听器。 register listener // * // * @param topic // * @param listener // */ // public void regi...
private MessageDispatcher messageDispatcher;
KoperGroup/koper
koper-core/src/main/java/koper/CommonMessageCenter.java
// Path: koper-core/src/main/java/koper/router/RoundRobinRouter.java // public class RoundRobinRouter implements Router { // // private AtomicInteger index = new AtomicInteger(0); // private List<RegItem> mailBoxList = new ArrayList<>(); // private ReentrantReadWriteLock mailBoxLock = new ReentrantReadWrit...
import koper.router.RoundRobinRouter; import koper.router.Router; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.LinkedBlockingQueue;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/router/RoundRobinRouter.java // public class RoundRobinRouter implements Router { // // private AtomicInteger index = new AtomicInteger(0); // private List<RegItem> mailBoxList = new ArrayList<>(); // private ReentrantReadWriteLock mailBoxLock = new ReentrantReadWrit...
private Router router;
KoperGroup/koper
koper-core/src/main/java/koper/CommonMessageCenter.java
// Path: koper-core/src/main/java/koper/router/RoundRobinRouter.java // public class RoundRobinRouter implements Router { // // private AtomicInteger index = new AtomicInteger(0); // private List<RegItem> mailBoxList = new ArrayList<>(); // private ReentrantReadWriteLock mailBoxLock = new ReentrantReadWrit...
import koper.router.RoundRobinRouter; import koper.router.Router; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.LinkedBlockingQueue;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/router/RoundRobinRouter.java // public class RoundRobinRouter implements Router { // // private AtomicInteger index = new AtomicInteger(0); // private List<RegItem> mailBoxList = new ArrayList<>(); // private ReentrantReadWriteLock mailBoxLock = new ReentrantReadWrit...
this.router = new RoundRobinRouter();
KoperGroup/koper
koper-aop/src/main/java/koper/aop/AbstractSendMessageAdvice.java
// Path: koper-core/src/main/java/koper/sender/MessageSender.java // public interface MessageSender { // // void send(String topic, String msg); // // void send(String topic, String key, String msg); // // void send(String topic, Object msg); // // void send(String topic, String key, Object msg); //...
import koper.sender.MessageSender; import org.aspectj.lang.ProceedingJoinPoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.sprin...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/sender/MessageSender.java // public interface MessageSender { // // void send(String topic, String msg); // // void send(String topic, String key, String msg); // // void send(String topic, Object msg); // // void send(String topic, String key, Object msg); //...
protected MessageSender messageSender;
KoperGroup/koper
koper-testcase/src/main/java/koper/listener/OrderListener.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import koper.AbstractMessageListener; import koper.Listen; import koper.demo.trading.mapper.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
public class OrderListener extends AbstractMessageListener {
KoperGroup/koper
koper-testcase/src/main/java/koper/listener/OrderListener.java
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
import koper.AbstractMessageListener; import koper.Listen; import koper.demo.trading.mapper.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/AbstractMessageListener.java // public abstract class AbstractMessageListener implements MessageListener { // // @Override // public void onMsgBean(MsgBean<String, String> msgBean) { // // } // // @Override // public void onMessage(String msg) { // } //...
public void onMessage(Order order) {
KoperGroup/koper
koper-demo/src/main/java/koper/demo/main/SendMsgDemo.java
// Path: koper-demo/src/main/java/koper/demo/message/entity/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phoneNo; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // this...
import koper.demo.message.entity.Member; import koper.demo.message.service.MemberService; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/message/entity/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phoneNo; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // this...
final MemberService memberService = context.getBean(MemberService.class);
KoperGroup/koper
koper-demo/src/main/java/koper/demo/main/SendMsgDemo.java
// Path: koper-demo/src/main/java/koper/demo/message/entity/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phoneNo; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // this...
import koper.demo.message.entity.Member; import koper.demo.message.service.MemberService; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-demo/src/main/java/koper/demo/message/entity/Member.java // public class Member { // // private Integer id; // // private String name; // // private String phoneNo; // // public Integer getId() { // return id; // } // // public void setId(Integer id) { // this...
Member member = new Member();
KoperGroup/koper
koper-core/src/main/java/koper/MessageListenerBeanPostProcessor.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import koper.client.ConsumerLauncher; import koper.util.ReflectUtil; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.facto...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
private ConsumerLauncher consumerLauncher;
KoperGroup/koper
koper-core/src/main/java/koper/MessageListenerBeanPostProcessor.java
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
import koper.client.ConsumerLauncher; import koper.util.ReflectUtil; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.facto...
// pojo listener final Listen listenAnnotation = bean.getClass().getAnnotation(Listen.class); final String topic = listenAnnotation.topic(); if (StringUtils.isBlank(topic)) { throw new RuntimeException( String.format("class %s, @Lis...
// Path: koper-core/src/main/java/koper/client/ConsumerLauncher.java // public interface ConsumerLauncher { // // /** // * start consumer // */ // public void start(); // // void setAutoStart(boolean autoStart); // // void setPartitions(int partitions); // // /** // * @param threa...
final Listen clazzAnnotation = ReflectUtil.getListenAnnotation(clazz);
KoperGroup/koper
koper-testcase/src/test/java/koper/kafka/SendMsgAopTest.java
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/Order.java // public class Order { // // public String orderId; // public String orderName; // public Date createDate; // public String memberId; // public BigDecimal totalPrice; // // public String getOrderId() { // return orderId; // } // pub...
import koper.demo.trading.mapper.Order; import koper.demo.trading.mapper.OrderMapper; import junit.textui.TestRunner; import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
// Path: koper-testcase/src/main/java/koper/demo/trading/mapper/Order.java // public class Order { // // public String orderId; // public String orderName; // public Date createDate; // public String memberId; // public BigDecimal totalPrice; // // public String getOrderId() { // return orderId; // } // pub...
Order order = new Order();