Skip to content

Commit

Permalink
新增log脱敏
Browse files Browse the repository at this point in the history
  • Loading branch information
pcm committed Nov 22, 2024
1 parent 3bdd789 commit 5310c6b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 68 deletions.
5 changes: 5 additions & 0 deletions springboot-log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,15 @@

<build>
<finalName>springboot-log</finalName>
<defaultGoal>compile</defaultGoal>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<mainClass>com.pancm.App</mainClass>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
Expand All @@ -234,4 +238,5 @@
</plugins>
</build>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
@ServletComponentScan
@SpringBootApplication
@Slf4j
public class Application {
public class App {

public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext application = SpringApplication.run(Application.class, args);
ConfigurableApplicationContext application = SpringApplication.run(App.class, args);
Environment env = application.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = env.getProperty("server.servlet.context-path");
log.info("\n----------------------------------------------------------\n\t" +
"Application springboot-demo is running! Access URLs:\n\t" +
"Application springboot-log is running! Access URLs:\n\t" +
"Local: \t\thttp://localhost:" + port + path + "/\n\t" +
"External: \thttp://" + ip + ":" + port + path + "/\n\t" +
"Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
Expand Down

This file was deleted.

17 changes: 0 additions & 17 deletions springboot-log/src/main/java/com/pancm/config/PluginOne.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public boolean update(T entity){
falg=true;
} catch (Exception e) {
logger.error("更新"+entity+"失败!原因是:",e);

}
return falg;
}
Expand Down

0 comments on commit 5310c6b

Please sign in to comment.