Privilege Control Series 3 - Fine-grained control privileges using interceptors
Preface
The granularity of permissions can be fine-grained, and can even be partitioned to each method in the code. As long as the user does not have permission to access a CRUD method, we can intercept it.
General thinking
Add a global interceptor to intercept the user's request and determine whether the user has permission to request th ...
Posted by imawake on Thu, 11 Apr 2019 09:18:31 -0700
Talk about how to program and implement transaction management in Spring
Spring provides the template class org. spring framework. transaction. support. Transaction Template for programmable transaction management, which can meet the needs of some special occasions.
Transaction Template is thread-safe, so you can share Transaction Template instances in multiple classes to achieve transaction mana ...
Posted by umer on Sat, 06 Apr 2019 18:57:30 -0700
Integrating mybatis+generator to automatically generate code
How to integrate Springboot and Mysteries framework, and then use generator to automatically generate mapper, pojo and other files.
1. Introduce the required files into the pom after the new sprongBook project
Database connection driver, mybatis Plus (including mybatis), generator, attention (configuration of generator plug-in in bulider)
&l ...
Posted by fuii_koh on Sun, 31 Mar 2019 14:42:30 -0700
IDEA 2016.1 Maven Spring MVC Use Tutorial (1)
1. Software versions
IntelliJ IDEA 2016.1
jdk1.8
maven3.3.9
tomcat 8.5.11 or jetty
2. Building a webapp with maven skeleton
Select create new project-Maven-Create from archetype. Find the maven-archetype-webapp skeleton, and then next.
Enter GroupId and ArtifactId for the next step.
Fill in the local maven environment, where you ...
Posted by tnkannan on Thu, 28 Mar 2019 07:15:30 -0700
Custom log configuration logback-spring.xml in SpringBook
scene
Log control and management can still be well supported through system attributes and traditional SpringBook external configuration files.
Naming Specifications for Different Logging Systems
Logback:logback-spring.xml logbak-spring.proovy logback.xml logback.groovy
Log4j:log4j-spring.properties log4j-spring.xml ...
Posted by vadercole on Wed, 27 Mar 2019 20:24:29 -0700
Log4j and log4j2
I believe that many programmer ape friends are familiar with log4j, log4j can be said to be accompanied by the vast majority of friends to open the programming. I don't know what log4j used to be, at least in my career, it was the era of log4j that led me to start.
Log4j is an open source project of Apache. We don't go into its origin, but ...
Posted by danjar on Fri, 22 Mar 2019 20:00:53 -0700
flume monitors spoolDir logs to HDFS for the entire process of small Demo
1. compiling Java Code, randomly generated user ID number, district and county number, Township number (district and township number in random three letters) and personal total income format sample: 7762a1-bf04-468a-91b6-a19d772f41fa\\\\\\\\\\\\
2. Use a thread loop to execute, Thread.sleep(100) to control the thread execution to stop 100 ms a ...
Posted by furma on Fri, 22 Mar 2019 15:42:52 -0700
Examples of log4j2.xml configuration and differences from log4j
<?xml version="1.0" encoding="UTF-8" ?>
<configuration status="warn">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%p] %d %c %l - %m%n"/>
</Console>
<RollingFile name="activity" fileName="/opt/fox.log"
fileP ...
Posted by Pr0digy on Thu, 14 Feb 2019 07:27:19 -0800
The project uses dubbo, zookeeper service report Can not initialize class org.I0Itec.zkclient.ZkClient
dubbo service is used in the project, zookeeper is used as the registry, logback is used as the log framework, and errors are reported as follows when starting the project:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.I0Itec.zkclient.ZkClient
at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperCl ...
Posted by mr.echo on Wed, 13 Feb 2019 18:42:19 -0800
Resolving Infor XA ERP System Link request response message using java
The SystemLink response message of Infor XA ERP is a relatively complex xml, which records the status of operation success and operation results or error instructions.
SystemLink parsing is to parse the operation result state from the xml message of the response, and extract the error message if the operation fails. Because Infor XA ERP System ...
Posted by mbeals on Tue, 12 Feb 2019 14:36:17 -0800