Skip to content

Commit 2cc57ce

Browse files
author
zhifu.xin
committed
MapStruct
1 parent bf38067 commit 2cc57ce

File tree

15 files changed

+151
-49
lines changed

15 files changed

+151
-49
lines changed

.idea/compiler.xml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
<module>springboot-erupt</module>
3131
<module>springboot-magic-api</module>
3232
<module>springboot-test</module>
33-
<!-- <module>springboot-jasypt</module>-->
33+
<module>springboot-mapstruct</module>
34+
<!-- <module>springboot-jasypt</module>-->
3435
<!-- <module>springboot-webhook-wechat</module>-->
3536
</modules>
3637

springboot-erupt/src/main/resources/application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
spring:
22
datasource:
3-
url: jdbc:mysql://47.93.6.5:3306/erupt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
3+
url: jdbc:mysql://127.0.0.1:3306/erupt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
44
username: root
5-
password: xinzhifu521
5+
password: sb886684
66
jpa:
77
show-sql: true
88
generate-ddl: true
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
/* 例:修改登录页背景图 */
2-
layout-passport > .container{
3-
background-position:center !important;
4-
background-repeat:repeat !important;
1+
/* 例:修改登录页样式 */
2+
layout-passport > .container {
3+
background-position: center !important;
4+
background-repeat: repeat !important;
55
background-size: cover !important;
6-
background-image:url(./login-img.png) !important;
6+
background-color: #fff !important;
7+
background-image: url(https://www.erupt.xyz/demo/login-bg.svg) !important;
78
}
89

910
layout-passport .title {
1011
font-family: Courier New, Menlo, Monaco, Consolas, monospace !important;
12+
}
13+
14+
layout-passport form {
15+
padding: 26px !important;
16+
margin: 8px !important;
17+
background: rgba(255, 255, 255, 0.9);
18+
border-radius: 3px;
19+
box-shadow: 1px 1px 10px rgba(190, 184, 184, 0.3);
1120
}
Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
1-
package com.xiaofu.process;
2-
3-
import lombok.NoArgsConstructor;
4-
import org.springframework.beans.BeansException;
5-
import org.springframework.beans.factory.annotation.Autowired;
6-
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
7-
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
8-
import org.springframework.context.annotation.Import;
9-
import org.springframework.core.Ordered;
10-
import org.springframework.core.env.*;
11-
12-
import java.util.Iterator;
13-
14-
@NoArgsConstructor
15-
public class MyPropertiesBeanFactoryPostProcessor implements BeanFactoryPostProcessor, Ordered {
16-
17-
EnvCopy1 envCopy1 ;
18-
19-
@Override
20-
public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
21-
MutablePropertySources propertySources = envCopy1.get().getPropertySources();
22-
Iterator<PropertySource<?>> iterator = propertySources.iterator();
23-
while (iterator.hasNext()) {
24-
PropertySource<?> propertySource = iterator.next();
25-
26-
if (propertySource instanceof PropertiesPropertySource) {
27-
System.out.println(propertySource.getProperty("propertyKey"));
28-
// 用propertySource.getSource() 可以获取全部配置
29-
}
30-
}
31-
}
32-
33-
@Override
34-
public int getOrder() {
35-
return 0;
36-
}
37-
38-
39-
}
1+
//package com.xiaofu.process;
2+
//
3+
//import lombok.NoArgsConstructor;
4+
//import org.springframework.beans.BeansException;
5+
//import org.springframework.beans.factory.annotation.Autowired;
6+
//import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
7+
//import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
8+
//import org.springframework.context.annotation.Import;
9+
//import org.springframework.core.Ordered;
10+
//import org.springframework.core.env.*;
11+
//
12+
//import java.util.Iterator;
13+
//
14+
//@NoArgsConstructor
15+
//public class MyPropertiesBeanFactoryPostProcessor implements BeanFactoryPostProcessor, Ordered {
16+
//
17+
// EnvCopy1 envCopy1 ;
18+
//
19+
// @Override
20+
// public void postProcessBeanFactory(ConfigurableListableBeanFactory a) throws BeansException {
21+
// MutablePropertySources propertySources = envCopy1.get().getPropertySources();
22+
// for (PropertySource<?> propertySource : propertySources) {
23+
// if (propertySource instanceof PropertiesPropertySource) {
24+
// System.out.println(propertySource.getProperty("propertyKey"));
25+
// // 用propertySource.getSource() 可以获取全部配置
26+
// }
27+
// }09ta
28+
// @Override
29+
// public int getOrder() {
30+
// return 0;
31+
// }
32+
//
33+
//
34+
//}

springboot-jasypt/src/main/resources/application.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ spring:
1111
# \u79D8\u94A5
1212
jasypt:
1313
encryptor:
14-
password: 35579B7F9C8CB15E
14+
password: 35579B7F9C8CB15E
15+
poolSize: 3

springboot-mapstruct/pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>Springboot-Notebook</artifactId>
7+
<groupId>com.notebook</groupId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>springboot-mapstruct</artifactId>
13+
14+
<properties>
15+
<maven.compiler.source>8</maven.compiler.source>
16+
<maven.compiler.target>8</maven.compiler.target>
17+
</properties>
18+
19+
<dependencies>
20+
<dependency>
21+
<groupId>org.mapstruct</groupId>
22+
<artifactId>mapstruct-jdk8</artifactId>
23+
<version>1.2.0.Final</version>
24+
</dependency>
25+
26+
<dependency>
27+
<groupId>org.mapstruct</groupId>
28+
<artifactId>mapstruct-processor</artifactId>
29+
<version>1.2.0.Final</version>
30+
</dependency>
31+
</dependencies>
32+
33+
</project>

0 commit comments

Comments
 (0)