Skip to content

Commit 9a554e9

Browse files
committed
style: update workflows and github actions
1 parent a9eb717 commit 9a554e9

27 files changed

+116
-116
lines changed

.github/workflows/branch-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jobs:
1313
with:
1414
github_token: ${{ github.token }}
1515
source_ref: ${{ github.ref }}
16-
target_branch: "main"
16+
target_branch: main
1717
commit_message_template: "[Automated] Merged {source_ref} into {target_branch}"

.github/workflows/prettier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
uses: creyD/prettier_action@v3.3
2121
with:
2222
prettier_options: --write **/*.{md}
23-
commit_message: "style: prettify code"
23+
commit_message: "style: prettify code or document"
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/Mybatis/核心处理层/Mybatis-DyanmicSqlSourcce.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public class StaticTextSqlNode implements SqlNode {
7777

7878
- `org.apache.ibatis.scripting.xmltags.DynamicContext#appendSql`
7979

80-
```JAVA
81-
public void appendSql(String sql) {
82-
sqlBuilder.add(sql);
83-
}
80+
```java
81+
public void appendSql(String sql) {
82+
sqlBuilder.add(sql);
83+
}
8484
```
8585

8686
- 解析`trim`标签
@@ -102,7 +102,7 @@ public class StaticTextSqlNode implements SqlNode {
102102

103103
![image-20191219152655746](../../../images/mybatis/image-20191219152655746.png)
104104

105-
```JAVA
105+
```java
106106
@Override
107107
public boolean apply(DynamicContext context) {
108108
if (evaluator.evaluateBoolean(test, context.getBindings())) {
@@ -116,7 +116,7 @@ public class StaticTextSqlNode implements SqlNode {
116116

117117
- `evaluator.evaluateBoolean(test, context.getBindings())`方法
118118

119-
```JAVA
119+
```java
120120
/**
121121
* @param expression 判断语句,ID != null
122122
* @param parameterObject 参数列表
@@ -135,7 +135,7 @@ public class StaticTextSqlNode implements SqlNode {
135135

136136
```
137137

138-
```JAVA
138+
```java
139139
/**
140140
* 取值
141141
* @param expression 判断语句,ID=NULL

docs/Spring/JDBC/Spring-jdbc.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
- 实体对象
2626

27-
```JAVA
27+
```java
2828
public class HsLog {
2929
private Integer id;
3030

@@ -50,7 +50,7 @@
5050

5151
- DAO
5252

53-
```JAVA
53+
```java
5454
public interface HsLogDao {
5555
List<HsLog> findAll();
5656

@@ -61,7 +61,7 @@
6161

6262
- 实现类
6363

64-
```JAVA
64+
```java
6565
public class HsLogDaoImpl extends JdbcDaoSupport implements HsLogDao {
6666

6767

@@ -154,7 +154,7 @@
154154

155155
- 运行方法
156156

157-
```JAVA
157+
```java
158158

159159
public class SpringJDBCSourceCode {
160160
public static void main(String[] args) {
@@ -251,7 +251,7 @@
251251

252252
- `org.springframework.jdbc.datasource.DataSourceUtils#releaseConnection`
253253

254-
```JAVA
254+
```java
255255
public static void releaseConnection(@Nullable Connection con, @Nullable DataSource dataSource) {
256256
try {
257257
doReleaseConnection(con, dataSource);
@@ -289,7 +289,7 @@ public static void doReleaseConnection(@Nullable Connection con, @Nullable DataS
289289

290290
链接数
291291

292-
```JAVA
292+
```java
293293
/**
294294
* Increase the reference count by one because the holder has been requested
295295
* (i.e. someone requested the resource held by it).
@@ -412,7 +412,7 @@ public void setDataSource(@Nullable DataSource dataSource) {
412412
}
413413
```
414414

415-
```JAVA
415+
```java
416416
@Override
417417
public List<T> extractData(ResultSet rs) throws SQLException {
418418
List<T> results = (this.rowsExpected > 0 ? new ArrayList<>(this.rowsExpected) : new ArrayList<>());

docs/Spring/RMI/Spring-RMI.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public class RMIClientSourceCode {
525525
1. 调用父类的`afterPropertiesSet`方法判断`serviceUrl`是否为空
526526
2. 执行`prepare()`方法
527527

528-
```JAVA
528+
```java
529529
public void prepare() throws RemoteLookupFailureException {
530530
// Cache RMI stub on initialization?
531531
if (this.lookupStubOnStartup) {
@@ -553,7 +553,7 @@ public class RMIClientSourceCode {
553553

554554
#### org.springframework.remoting.rmi.RmiClientInterceptor#lookupStub
555555

556-
```JAVA
556+
```java
557557
protected Remote lookupStub() throws RemoteLookupFailureException {
558558
try {
559559
Remote stub = null;
@@ -625,7 +625,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
625625

626626
- 通过类图我们可以知道`RmiProxyFactoryBean`实现了`MethodInterceptor`,具体实现方法在`org.springframework.remoting.rmi.RmiClientInterceptor#invoke`
627627

628-
```JAVA
628+
```java
629629
@Override
630630
public Object invoke(MethodInvocation invocation) throws Throwable {
631631
// 获取remote
@@ -649,7 +649,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
649649

650650
```
651651

652-
```JAVA
652+
```java
653653
protected Remote getStub() throws RemoteLookupFailureException {
654654
if (!this.cacheStub || (this.lookupStubOnStartup && !this.refreshStubOnConnectFailure)) {
655655
// 如果缓存stub存在直接获取,否则创建
@@ -668,7 +668,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
668668

669669
- `org.springframework.remoting.rmi.RmiClientInterceptor#doInvoke(org.aopalliance.intercept.MethodInvocation, org.springframework.remoting.rmi.RmiInvocationHandler)`
670670

671-
```JAVA
671+
```java
672672
@Nullable
673673
protected Object doInvoke(MethodInvocation methodInvocation, RmiInvocationHandler invocationHandler)
674674
throws RemoteException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
@@ -693,7 +693,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
693693

694694
- `org.springframework.remoting.rmi.RmiInvocationWrapper#invoke`
695695

696-
```JAVA
696+
```java
697697
/**
698698
* Delegates the actual invocation handling to the RMI exporter.
699699
*
@@ -712,7 +712,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
712712

713713
- 继续跟踪`org.springframework.remoting.rmi.RmiBasedExporter#invoke`
714714

715-
```JAVA
715+
```java
716716
@Override
717717
protected Object invoke(RemoteInvocation invocation, Object targetObject)
718718
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
@@ -723,7 +723,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
723723

724724
- 继续跟踪`org.springframework.remoting.support.RemoteInvocationBasedExporter#invoke`
725725

726-
```JAVA
726+
```java
727727
protected Object invoke(RemoteInvocation invocation, Object targetObject)
728728
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
729729

@@ -761,7 +761,7 @@ protected Remote lookupStub() throws RemoteLookupFailureException {
761761

762762
![image-20200226083247784](../../../images/spring/image-20200226083247784.png)
763763

764-
```JAVA
764+
```java
765765
public class DefaultRemoteInvocationExecutor implements RemoteInvocationExecutor {
766766

767767
@Override
@@ -776,7 +776,7 @@ public class DefaultRemoteInvocationExecutor implements RemoteInvocationExecutor
776776
}
777777
```
778778

779-
```JAVA
779+
```java
780780
public Object invoke(Object targetObject)
781781
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
782782

docs/Spring/SpringMVC/SpringMVC-CROS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public class JSONController {
8686

8787
- `org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#initCorsConfiguration`
8888

89-
```JAVA
89+
```java
9090
@Override
9191
protected CorsConfiguration initCorsConfiguration(Object handler, Method method, RequestMappingInfo mappingInfo) {
9292
// 重新创建,为什么不作为参数传递: 还有别的实现方法
@@ -244,7 +244,7 @@ public class JSONController {
244244
- 实现**BeanDefinitionParser** 接口的都有一个**parse**方法直接看方法.
245245
- 通过查看我们可以知道最终目的获取 xml 标签中的属性,对 **CorsConfiguration**进行初始化,最后 Spring 中注册
246246

247-
```JAVA
247+
```java
248248
public class CorsBeanDefinitionParser implements BeanDefinitionParser {
249249

250250
@Override
@@ -341,7 +341,7 @@ public class CorsBeanDefinitionParser implements BeanDefinitionParser {
341341

342342
- 跨域信息
343343

344-
```JAVA
344+
```java
345345
/**
346346
* 允许请求源
347347
*/
@@ -511,7 +511,7 @@ public class CorsBeanDefinitionParser implements BeanDefinitionParser {
511511

512512
![image-20200123093733129](../../../images/springMVC/clazz/image-20200123093733129.png)
513513

514-
```JAVA
514+
```java
515515
@Override
516516
@SuppressWarnings("resource")
517517
public boolean processRequest(@Nullable CorsConfiguration config, HttpServletRequest request,

docs/Spring/TX/Spring-transaction.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public class DeclarativeTransactionTest {
505505

506506
- `tm.getTransaction`
507507

508-
```JAVA
508+
```java
509509
@Override
510510
public final TransactionStatus getTransaction(@Nullable TransactionDefinition definition)
511511
throws TransactionException {
@@ -577,7 +577,7 @@ public class DeclarativeTransactionTest {
577577

578578
- `org.springframework.jdbc.datasource.DataSourceTransactionManager#doGetTransaction`
579579

580-
```JAVA
580+
```java
581581
@Override
582582
protected Object doGetTransaction() {
583583
DataSourceTransactionObject txObject = new DataSourceTransactionObject();
@@ -594,7 +594,7 @@ public class DeclarativeTransactionTest {
594594

595595
- `org.springframework.transaction.support.AbstractPlatformTransactionManager#suspend`
596596

597-
```JAVA
597+
```java
598598
@Nullable
599599
protected final SuspendedResourcesHolder suspend(@Nullable Object transaction)
600600
throws TransactionException {
@@ -642,7 +642,7 @@ public class DeclarativeTransactionTest {
642642

643643
- `prepareTransactionInfo`简单的`new`对象并且绑定线程
644644

645-
```JAVA
645+
```java
646646
protected TransactionInfo prepareTransactionInfo(@Nullable PlatformTransactionManager tm,
647647
@Nullable TransactionAttribute txAttr, String joinpointIdentification,
648648
@Nullable TransactionStatus status) {
@@ -1654,7 +1654,7 @@ static Object unwrapResourceIfNecessary(Object resource) {
16541654

16551655
- `ScopedProxyUnwrapper.unwrapIfNecessary`
16561656

1657-
```JAVA
1657+
```java
16581658
private static class ScopedProxyUnwrapper {
16591659

16601660
public static Object unwrapIfNecessary(Object resource) {

docs/Spring/clazz/Spring-ApplicationListener.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class DemoApplicationListener implements ApplicationListener {
3030
</beans>
3131
```
3232

33-
```JAVA
33+
```java
3434
public class ListenerSourceCode {
3535
public static void main(String[] args) {
3636
ApplicationContext context = new ClassPathXmlApplicationContext("Listener-demo.xml");
@@ -68,7 +68,7 @@ public class ListenerSourceCode {
6868

6969
## 注册
7070

71-
```JAVA
71+
```java
7272
protected void registerListeners() {
7373
// Register statically specified listeners first.
7474
// 读取 ApplicationListener

docs/Spring/clazz/Spring-BeanDefinitionParserDelegate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public AbstractBeanDefinition parseBeanDefinitionElement(
399399

400400
- 将 xml 标签的数据读取到内存中设置给`AbstractBeanDefinition`
401401

402-
```JAVA
402+
```java
403403
public AbstractBeanDefinition parseBeanDefinitionAttributes(Element ele, String beanName,
404404
@Nullable BeanDefinition containingBean, AbstractBeanDefinition bd) {
405405

@@ -971,7 +971,7 @@ public Object parseIdRefElement(Element ele) {
971971

972972
- `org.springframework.beans.factory.xml.BeanDefinitionParserDelegate#parseValueElement`
973973

974-
```JAVA
974+
```java
975975
public Object parseValueElement(Element ele, @Nullable String defaultTypeName) {
976976
// It's a literal value.
977977
// 获取 xml 中的文本变量

docs/Spring/clazz/Spring-BeanFactoryPostProcessor.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ public class BeanFactoryPostProcessorSourceCode {
8080

8181
- `org.springframework.context.support.AbstractApplicationContext#refresh`
8282

83-
```JAVA
83+
```java
8484
invokeBeanFactoryPostProcessors(beanFactory);
8585
```
8686

87-
```JAVA
87+
```java
8888
protected void invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory beanFactory) {
8989
PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(beanFactory, getBeanFactoryPostProcessors());
9090

@@ -100,7 +100,7 @@ public class BeanFactoryPostProcessorSourceCode {
100100

101101
- `org.springframework.context.support.PostProcessorRegistrationDelegate#invokeBeanFactoryPostProcessors(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.List<org.springframework.beans.factory.config.BeanFactoryPostProcessor>)`
102102

103-
```JAVA
103+
```java
104104
public static void invokeBeanFactoryPostProcessors(
105105
ConfigurableListableBeanFactory beanFactory, List<BeanFactoryPostProcessor> beanFactoryPostProcessors) {
106106

@@ -373,13 +373,13 @@ public class DemoInstantiationAwareBeanPostProcessor implements InstantiationAwa
373373

374374
`org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#createBean(java.lang.String, org.springframework.beans.factory.support.RootBeanDefinition, java.lang.Object[])`中有如下代码
375375

376-
```JAVA
376+
```java
377377
Object bean = resolveBeforeInstantiation(beanName, mbdToUse);
378378
```
379379

380380
- `org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#resolveBeforeInstantiation`
381381

382-
```JAVA
382+
```java
383383
@Nullable
384384
protected Object resolveBeforeInstantiation(String beanName, RootBeanDefinition mbd) {
385385
Object bean = null;
@@ -405,7 +405,7 @@ public class DemoInstantiationAwareBeanPostProcessor implements InstantiationAwa
405405

406406
- `org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#applyBeanPostProcessorsBeforeInstantiation`
407407

408-
```JAVA
408+
```java
409409
@Nullable
410410
protected Object applyBeanPostProcessorsBeforeInstantiation(Class<?> beanClass, String beanName) {
411411
for (BeanPostProcessor bp : getBeanPostProcessors()) {

docs/Spring/clazz/Spring-BeanNameGenerator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface BeanNameGenerator {
3030

3131
- 调用工具类方法进行生成
3232

33-
```JAVA
33+
```java
3434
@Override
3535
public String generateBeanName(BeanDefinition definition, BeanDefinitionRegistry registry) {
3636
return BeanDefinitionReaderUtils.generateBeanName(definition, registry);

0 commit comments

Comments
 (0)