Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bootstack is a open source privilege management platform
|:---:|---|
|Java|1.8+|
|Jwt|-|
|SpringBoot|1.5.x|
|SpringBoot|2.1.x|
|Spring Security|-|
|Spring Security Oauth2|-|
|Spring Data JPA|-|
Expand All @@ -26,22 +26,17 @@ bootstack is a open source privilege management platform

---

- [Internal](https://gitqub.com/SpringStack/bootstack.git)
- [GitHub](https://github.com/springstack/bootstack.git)
- [Gitee](https://gitee.com/Spring-Stack/bootstack.git)

### Wiki

---

- [Wiki](http://wiki.ttxit.com/display/bootstack)

### Issues

---

- [JIRA](http://jira.ttxit.com/projects/BOOTSTACK)

### Contact us

---
Expand Down
8 changes: 6 additions & 2 deletions bootstack-aop/pom.xml → aop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>incubator-bootstack</artifactId>
<groupId>com.bootstack</groupId>
<version>1.0.4</version>
<version>1.0.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -35,7 +35,11 @@
</dependency>
<dependency>
<groupId>com.bootstack</groupId>
<artifactId>bootstack-service</artifactId>
<artifactId>bootstack-storage-mysql</artifactId>
</dependency>
<dependency>
<groupId>com.bootstack</groupId>
<artifactId>bootstack-storage-mongodb</artifactId>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@
*/
package com.bootstack.aop.log;

import com.bootstack.model.system.interfaces.SystemInterfaceModel;
import com.bootstack.model.system.log.SystemLogModel;
import com.bootstack.model.system.log.SystemLogTypeModel;
import com.bootstack.model.system.method.SystemMethodModel;
import com.bootstack.model.user.UserModel;
import com.bootstack.service.system.interfaces.SystemInterfaceService;
import com.bootstack.service.system.log.SystemLogService;
import com.bootstack.service.system.method.SystemMethodService;
import com.bootstack.service.user.UserService;
import com.bootstack.storage.mongodb.model.system.SystemLogToMongoDbModel;
import com.bootstack.storage.mongodb.service.system.log.SystemLogToMongoDbService;
import com.bootstack.storage.mysql.model.system.interfaces.SystemInterfaceModel;
import com.bootstack.storage.mysql.model.system.log.SystemLogModel;
import com.bootstack.storage.mysql.model.system.log.SystemLogTypeModel;
import com.bootstack.storage.mysql.model.system.method.SystemMethodModel;
import com.bootstack.storage.mysql.model.user.UserModel;
import com.bootstack.storage.mysql.service.system.interfaces.SystemInterfaceService;
import com.bootstack.storage.mysql.service.system.log.SystemLogService;
import com.bootstack.storage.mysql.service.system.method.SystemMethodService;
import com.bootstack.storage.mysql.service.user.UserService;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
Expand Down Expand Up @@ -64,6 +66,9 @@ public class ControllerLogAspect {
@Autowired
private SystemMethodService systemMethodService;

@Autowired
private SystemLogToMongoDbService systemLogToMongoDbService;

@Pointcut("execution(* com.bootstack.core.controller..*.*(..))")
private void controller() {
}
Expand All @@ -88,18 +93,29 @@ public void doBefore(JoinPoint joinPoint) throws Throwable {
}
}
}
SystemLogModel log = new SystemLogModel();
log.setUrl(request.getServletPath());
log.setArgs(Arrays.toString(joinPoint.getArgs()));
log.setClazz(joinPoint.getSignature().getDeclaringTypeName());
log.setClassMethod(joinPoint.getSignature().getName());
log.setMethod(request.getMethod());
log.setRemoteIp(request.getRemoteAddr());
SystemLogTypeModel logType = new SystemLogTypeModel();
logType.setId(4L);
log.setType(logType);
log.setUser(user);
this.systemLogService.insertModel(log);
// SystemLogModel log = new SystemLogModel();
// log.setUrl(request.getServletPath());
// log.setArgs(Arrays.toString(joinPoint.getArgs()));
// log.setClazz(joinPoint.getSignature().getDeclaringTypeName());
// log.setClassMethod(joinPoint.getSignature().getName());
// log.setMethod(request.getMethod());
// log.setRemoteIp(request.getRemoteAddr());
// SystemLogTypeModel logType = new SystemLogTypeModel();
// logType.setId(4L);
// log.setType(logType);
// log.setUser(user);
// this.systemLogService.insertModel(log);
// 存储日志信息到Mongo中
SystemLogToMongoDbModel logToMongoDbModel = new SystemLogToMongoDbModel();
logToMongoDbModel.setUrl(request.getServletPath());
logToMongoDbModel.setArgs(Arrays.toString(joinPoint.getArgs()));
logToMongoDbModel.setClazz(joinPoint.getSignature().getDeclaringTypeName());
logToMongoDbModel.setClassMethod(joinPoint.getSignature().getName());
logToMongoDbModel.setMethod(request.getMethod());
logToMongoDbModel.setRemoteIp(request.getRemoteAddr());
logToMongoDbModel.setUserId(user.getId());
logToMongoDbModel.setUserName(user.getName());
this.systemLogToMongoDbService.insertModel(logToMongoDbModel);
}

@AfterReturning(returning = "response", pointcut = "controller()")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

import com.bootstack.common.enums.SystemMessageEnums;
import com.bootstack.common.enums.UserMessageEnums;
import com.bootstack.model.user.UserModel;
import com.bootstack.service.user.UserService;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.bootstack.storage.mysql.model.user.UserModel;
import com.bootstack.storage.mysql.service.user.UserService;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
Expand Down Expand Up @@ -84,4 +83,4 @@ public void paramValidation(JoinPoint point, UserRequiredParamPathAndQueryAopVal
}
}

}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions bootstack-service/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion bootstack-cache/pom.xml → cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>incubator-bootstack</artifactId>
<groupId>com.bootstack</groupId>
<version>1.0.4</version>
<version>1.0.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion bootstack-common/pom.xml → common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>incubator-bootstack</artifactId>
<groupId>com.bootstack</groupId>
<version>1.0.4</version>
<version>1.0.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.bootstack.model.page;
package com.bootstack.common.page;

import org.springframework.data.domain.*;

Expand Down
10 changes: 1 addition & 9 deletions bootstack-core/pom.xml → core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>incubator-bootstack</artifactId>
<groupId>com.bootstack</groupId>
<version>1.0.4</version>
<version>1.0.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -49,14 +49,6 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.bootstack</groupId>
<artifactId>bootstack-common</artifactId>
</dependency>
<dependency>
<groupId>com.bootstack</groupId>
<artifactId>bootstack-service</artifactId>
</dependency>
<dependency>
<groupId>com.bootstack</groupId>
<artifactId>bootstack-param</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
@SpringBootApplication
@PropertySource(value = {
"bootstack.properties",
"bootstack-database.properties",
"bootstack-api.properties"
})
public class BootStackBootstrap {
Expand All @@ -53,4 +52,4 @@ public static void main(String[] args) {
SpringApplication.run(BootStackBootstrap.class, args);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

import com.bootstack.core.config.handler.BootStackAccessDeniedHandler;
import com.bootstack.core.config.point.BootStackAuthenticationEntryPoint;
import com.bootstack.model.system.method.SystemMethodModel;
import com.bootstack.service.system.interfaces.SystemInterfaceService;
import com.bootstack.storage.mysql.model.system.method.SystemMethodModel;
import com.bootstack.storage.mysql.service.system.interfaces.SystemInterfaceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import com.bootstack.common.enums.SystemMessageEnums;
import com.bootstack.common.validation.ValidationUtils;
import com.bootstack.model.common.CommonResponseModel;
import com.bootstack.storage.mysql.model.common.CommonResponseModel;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.validation.BindException;
import org.springframework.web.HttpMediaTypeNotSupportedException;
Expand Down
Loading