保存进度!
This commit is contained in:
		@@ -1,5 +1,16 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: Kane
 | 
			
		||||
 * @Date: 2024-03-25 16:10:49
 | 
			
		||||
 * @LastEditors: Kane
 | 
			
		||||
 * @FilePath: /OnJava/src/main/java/org/kane/App.java
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (c) ${2023} by Kane, All Rights Reserved. 
 | 
			
		||||
 */
 | 
			
		||||
package org.kane;
 | 
			
		||||
 | 
			
		||||
import java.math.BigInteger;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Hello world!
 | 
			
		||||
 *
 | 
			
		||||
@@ -8,6 +19,18 @@ public class App
 | 
			
		||||
{
 | 
			
		||||
    public static void main( String[] args )
 | 
			
		||||
    {
 | 
			
		||||
        BigInteger i = new BigInteger( "1233423453454354634565346", 10 );
 | 
			
		||||
 | 
			
		||||
        int[] arrayI =
 | 
			
		||||
        { 0, 0, 0, 1};
 | 
			
		||||
 | 
			
		||||
        {int x = 0;}
 | 
			
		||||
 | 
			
		||||
        {
 | 
			
		||||
            int x=2;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        System.out.println( i );
 | 
			
		||||
        System.out.println( "Hello World!" );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
{
 | 
			
		||||
    "java.compile.nullAnalysis.mode": "automatic",
 | 
			
		||||
    "java.configuration.updateBuildConfiguration": "interactive"
 | 
			
		||||
    "java.configuration.updateBuildConfiguration": "automatic"
 | 
			
		||||
}
 | 
			
		||||
@@ -1,11 +1,12 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
 | 
			
		||||
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
	<modelVersion>4.0.0</modelVersion>
 | 
			
		||||
	<parent>
 | 
			
		||||
		<groupId>org.springframework.boot</groupId>
 | 
			
		||||
		<artifactId>spring-boot-starter-parent</artifactId>
 | 
			
		||||
		<version>3.2.2</version>
 | 
			
		||||
		<version>3.2.3</version>
 | 
			
		||||
		<relativePath /> <!-- lookup parent from repository -->
 | 
			
		||||
	</parent>
 | 
			
		||||
	<groupId>com.cpic.xim</groupId>
 | 
			
		||||
@@ -33,6 +34,21 @@
 | 
			
		||||
			<artifactId>spring-boot-starter-test</artifactId>
 | 
			
		||||
			<scope>test</scope>
 | 
			
		||||
		</dependency>
 | 
			
		||||
 | 
			
		||||
		<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
 | 
			
		||||
		<dependency>
 | 
			
		||||
			<groupId>org.apache.logging.log4j</groupId>
 | 
			
		||||
			<artifactId>log4j-core</artifactId>
 | 
			
		||||
			<version>2.20.0</version>
 | 
			
		||||
		</dependency>
 | 
			
		||||
		<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j2-impl -->
 | 
			
		||||
		<dependency>
 | 
			
		||||
			<groupId>org.apache.logging.log4j</groupId>
 | 
			
		||||
			<artifactId>log4j-slf4j2-impl</artifactId>
 | 
			
		||||
			<version>2.20.0</version>
 | 
			
		||||
			<scope>test</scope>
 | 
			
		||||
		</dependency>
 | 
			
		||||
 | 
			
		||||
	</dependencies>
 | 
			
		||||
 | 
			
		||||
	<build>
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,8 @@
 | 
			
		||||
 */
 | 
			
		||||
package com.cpic.xim.SpringLearning;
 | 
			
		||||
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
import org.springframework.web.bind.annotation.GetMapping;
 | 
			
		||||
@@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 | 
			
		||||
@RestController
 | 
			
		||||
public class SpringLearningApplication
 | 
			
		||||
{
 | 
			
		||||
	private static Logger logger = LoggerFactory.getLogger(SpringLearningApplication.class);
 | 
			
		||||
	
 | 
			
		||||
	public static void main( String[] args )
 | 
			
		||||
	{
 | 
			
		||||
@@ -27,6 +30,8 @@ public class SpringLearningApplication
 | 
			
		||||
	@GetMapping("/helloworld")
 | 
			
		||||
	public String helloWorld()
 | 
			
		||||
	{
 | 
			
		||||
		logger.info("请求 hello world!!!!!!!!!");
 | 
			
		||||
 | 
			
		||||
		return "<h1 style='color:red;'>Hello Spring!</h1>";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								Spring学习/SpringLearning/src/main/resources/log4j2.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								Spring学习/SpringLearning/src/main/resources/log4j2.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!-- Configuration后面的status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出。 -->
 | 
			
		||||
<!-- monitorInterval:Log4j能够自动检测修改配置 文件和重新配置本身,设置间隔秒数。-->
 | 
			
		||||
<Configuration status="WARN" monitorInterval="300">
 | 
			
		||||
    <Appenders>
 | 
			
		||||
        <Console name="Console" target="SYSTEM_OUT">
 | 
			
		||||
            <PatternLayout charset="UTF-8" pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} ### %msg%n" />
 | 
			
		||||
            <ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
 | 
			
		||||
        </Console>
 | 
			
		||||
        <RollingFile name="rolling_file_win" filename="./logs/桌面霸屏/app.log"
 | 
			
		||||
            filePattern="./logs/桌面霸屏/logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
 | 
			
		||||
            <PatternLayout>
 | 
			
		||||
                <Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
 | 
			
		||||
            </PatternLayout>
 | 
			
		||||
            <Policies>
 | 
			
		||||
                <TimeBasedTriggeringPolicy interval="1" />
 | 
			
		||||
                <SizeBasedTriggeringPolicy size="20MB" />
 | 
			
		||||
                <DefaultRolloverStrategy max="20" />
 | 
			
		||||
            </Policies>
 | 
			
		||||
        </RollingFile>
 | 
			
		||||
        <RollingFile name="rolling_file_linux" filename="/logs/桌面霸屏/app.log"
 | 
			
		||||
            filePattern="/logs/桌面霸屏/logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
 | 
			
		||||
            <PatternLayout>
 | 
			
		||||
                <Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
 | 
			
		||||
            </PatternLayout>
 | 
			
		||||
            <Policies>
 | 
			
		||||
                <TimeBasedTriggeringPolicy interval="1" />
 | 
			
		||||
                <SizeBasedTriggeringPolicy size="20MB" />
 | 
			
		||||
                <DefaultRolloverStrategy max="20" />
 | 
			
		||||
            </Policies>
 | 
			
		||||
        </RollingFile>
 | 
			
		||||
    </Appenders>
 | 
			
		||||
    <Loggers>
 | 
			
		||||
        <!-- <Logger name="mylog" level="info">
 | 
			
		||||
            <AppenderRef ref="rolling_file" />
 | 
			
		||||
        </Logger> -->
 | 
			
		||||
        <Root level="debug">
 | 
			
		||||
            <AppenderRef ref="rolling_file_linux" />
 | 
			
		||||
            <AppenderRef ref="rolling_file_win" />
 | 
			
		||||
            <AppenderRef ref="Console" />
 | 
			
		||||
        </Root>
 | 
			
		||||
    </Loggers>
 | 
			
		||||
</Configuration>
 | 
			
		||||
		Reference in New Issue
	
	Block a user