首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >【尚筹网】二、环境搭建一

【尚筹网】二、环境搭建一

作者头像
用户11332765
发布于 2024-11-26 04:10:23
发布于 2024-11-26 04:10:23
9700
代码可运行
举报
文章被收录于专栏:编程编程
运行总次数:0
代码可运行

环境搭建总体目标

创建工程

系统架构图

工程创建计划

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
atcrowdfunding01-admin-parent
 groupId:com.atguigu.crowd
 artifactId:atcrowdfunding01-admin-parent
 packaging:pom
atcrowdfunding02-admin-webui
 groupId:com.atguigu.crowd
 artifactId:atcrowdfunding02-admin-webui
 packaging:war
atcrowdfunding03-admin-component
 groupId:com.atguigu.crowd
artifactId:atcrowdfunding03-admin-component
 packaging:jar
atcrowdfunding04-admin-entity
 groupId:com.atguigu.crowd
 artifactId:atcrowdfunding04-admin-entity
 packaging:jar
atcrowdfunding05-common-util
 groupId:com.atguigu.crowd
 artifactId:atcrowdfunding05-common-util
 packaging:jar
atcrowdfunding06-common-reverse
 groupId:com.atguigu.crowd
 artifactId:atcrowdfunding06-common-reverse
 packaging:jar

创建空项目

创建对应的 Maven 模块
建立模块间的依赖
  • webui 依赖 component
  • component 依赖 entity
  • component 依赖 util

创建数据库

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
CREATE DATABASE `project_crowd` CHARACTER SET utf8;
use project_crowd;
drop table if exists t_admin;
create table t_admin
(
    id          int          not null auto_increment, # 主键
    login_acct  varchar(255) not null,                # 登录账号
    user_pswd   char(32)     not null,                # 登录密码
    user_name   varchar(255) not null,                # 昵称
    email       varchar(255) not null,                # 邮件地址
    create_time char(19),                             # 创建时间
    primary key (id)
);

基于 Maven 的 Mybatis 的逆向过程

配置 pom

在 atcrowdfunding06-common-reverse 模块的 pom.xml 中配置

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<dependencies>
	<dependency>
		<groupId>org.mybatis</groupId>
		<artifactId>mybatis</artifactId>
		<version>3.2.8</version>
	</dependency>
</dependencies>

<build>
	<plugins>
		<plugin>
			<groupId>org.mybatis.generator</groupId>
			<artifactId>mybatis-generator-maven-plugin</artifactId>
			<version>1.3.0</version>

			<dependencies>

				<dependency>
					<groupId>org.mybatis.generator</groupId>
					<artifactId>mybatis-generator-core</artifactId>
					<version>1.3.2</version>
				</dependency>
				<dependency>
					<groupId>com.mchange</groupId>
					<artifactId>c3p0</artifactId>
					<version>0.9.2</version>
				</dependency>

				<dependency>
					<groupId>mysql</groupId>
					<artifactId>mysql-connector-java</artifactId>
					<version>8.0.33</version>
				</dependency>
			</dependencies>
		</plugin>
	</plugins>
</build>

创建 generatorConfig.xml

在 atcrowdfunding06-common-reverse 模块下的 src/main/resources 目录下创建 generatorConfig.xml,用来配置逆向工程

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
	<!--mybatis-generator:generate-->
	<context id="atguiguTables" targetRuntime="MyBatis3">
		<commentGenerator>
			<!--是否去除自动生成的注释true:;false:-->
			<property name="suppressAllComments" value="true"/>
		</commentGenerator>
		<!--数据库连接的信息:驱动类、连接地址、用户名、密码-->
		<jdbcConnection
				driverClass="com.mysql.cj.jdbc.Driver"
				connectionURL="jdbc:mysql://localhost:3306/project_crowd?serverTimezone=Asia/Shanghai"
				userId="root"
				password="123456">
		</jdbcConnection>
		<!--默认false,把JDBCDECIMALNUMERIC类型解析为Integer,为true时把 JDBC DECIMALNUMERIC类型解析为java.math.BigDecimal-->
		<javaTypeResolver>
			<property name="forceBigDecimals" value="false"/>
		</javaTypeResolver>
		<!--targetProject:生成Entity类的路径-->
		<javaModelGenerator targetProject=".\src\main\java"
		                    targetPackage="com.atguigu.crowd.entity">
			<!--enableSubPackages:是否让schema作为包的后缀-->
			<property name="enableSubPackages" value="false"/>
			<!--从数据库返回的值被清理前后的空格-->
			<property name="trimStrings" value="true"/>
		</javaModelGenerator>
		<!--targetProject:XxxMapper.xml映射文件生成的路径-->
		<sqlMapGenerator targetProject=".\src\main\java"
		                 targetPackage="com.atguigu.crowd.mapper">
			<!--enableSubPackages:是否让schema作为包的后缀-->
			<property name="enableSubPackages" value="false"/>
		</sqlMapGenerator>
		<!--targetPackage:Mapper接口生成的位置-->
		<javaClientGenerator type="XMLMAPPER"
		                     targetProject=".\src\main\java"
		                     targetPackage="com.atguigu.crowd.mapper">
			<!--enableSubPackages:是否让schema作为包的后缀-->
			<property name="enableSubPackages" value="false"/>
		</javaClientGenerator>
		<!--数据库表名字和我们的entity类对应的映射指定-->
		<table tableName="t_admin" domainObjectName="Admin"/>
	</context>
</generatorConfiguration>

执行逆向工程操作的 maven 指令

双击即可

将逆向工程生成的资源归位

创建完后给 Admin 添加无参全参构造器,然后给生成的资源归位

父工程依赖管理

版本声明

在 atcrowdfunding01-admin-parent 模块的 pom.xml 中进行版本声明

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<properties>
	<maven.compiler.source>8</maven.compiler.source>
	<maven.compiler.target>8</maven.compiler.target>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<!--声明属性,对Spring的版本进行统一管理-->
	<atguigu.spring.version>4.3.20.RELEASE</atguigu.spring.version>
	<!--声明属性,对SpringSecurity的版本进行统一管理-->
	<atguigu.spring.security.version>4.2.10.RELEASE</atguigu.spring.security.version>
</properties>

依赖管理

在 atcrowdfunding01-admin-parent 中进行版本声明后,还需要引入依赖

遇到的问题:若依赖基本全部爆红(没下载 jar 包),可以将 dependencyManagement 删去后再重新加载,等下载完 jar 包后再加回去

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<dependencyManagement>
	<dependencies>
		<!-- Spring 依赖 -->
		<!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${atguigu.spring.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${atguigu.spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${atguigu.spring.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.9.2</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/cglib/cglib -->
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2</version>
		</dependency>
		<!-- 数据库依赖 -->
		<!-- MySQL 驱动 -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.3</version>
		</dependency>
		<!-- 数据源 -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>1.0.31</version>
		</dependency>
		<!-- MyBatis -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
			<version>3.2.8</version>
		</dependency>
		<!-- MyBatis 与 Spring 整合 -->
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
			<version>1.2.2</version>
		</dependency>
		<!-- MyBatis 分页插件 -->
		<dependency>
			<groupId>com.github.pagehelper</groupId>
			<artifactId>pagehelper</artifactId>
			<version>4.0.0</version>
		</dependency>
		<!-- 日志 -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.7</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
		</dependency>
		<!-- 其他日志框架的中间转换包 -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>1.7.25</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>1.7.25</version>
		</dependency>
		<!-- Spring 进行 JSON 数据转换依赖 -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
			<version>2.9.8</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.9.8</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
			<version>2.9.8</version>
		</dependency>
		<!-- JSTL 标签库 -->
		<dependency>
			<groupId>jstl</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>
		<!-- junit 测试 -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<!-- 引入 Servlet 容器中相关依赖 -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>
		<!-- JSP 页面使用的依赖 -->
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1.3-b06</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.5</version>
		</dependency>
		<!-- SpringSecurity 对 Web 应用进行权限管理 -->
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-web</artifactId>
			<version>4.2.10.RELEASE</version>
		</dependency>
		<!-- SpringSecurity 配置 -->
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-config</artifactId>
			<version>4.2.10.RELEASE</version>
		</dependency>
		<!-- SpringSecurity 标签库 -->
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-taglibs</artifactId>
			<version>4.2.10.RELEASE</version>
		</dependency>
	</dependencies>
</dependencyManagement>

Spring 整合 MyBatis

思路

具体操作

在子工程中加入搭建环境的所需的具体依赖

在 atcrowdfunding03-admin-component 模块添加依赖

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!-- Spring依赖 -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
<dependency>
	<groupId>org.springframework</groupId>
	<artifactId>spring-orm</artifactId>
	<exclusions>
		<exclusion>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
		</exclusion>
	</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
	<groupId>org.springframework</groupId>
	<artifactId>spring-webmvc</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
	<groupId>org.aspectj</groupId>
	<artifactId>aspectjweaver</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/cglib/cglib -->
<dependency>
	<groupId>cglib</groupId>
	<artifactId>cglib</artifactId>
</dependency>

<!-- 数据库依赖 -->
<!-- MySQL驱动 -->
<dependency>
	<groupId>mysql</groupId>
	<artifactId>mysql-connector-java</artifactId>
</dependency>

<!-- 数据源 -->
<dependency>
	<groupId>com.alibaba</groupId>
	<artifactId>druid</artifactId>
</dependency>

<!-- MyBatis -->
<dependency>
	<groupId>org.mybatis</groupId>
	<artifactId>mybatis</artifactId>
</dependency>

<!-- MyBatis与Spring整合 -->
<dependency>
	<groupId>org.mybatis</groupId>
	<artifactId>mybatis-spring</artifactId>
</dependency>

<!-- MyBatis分页插件 -->
<dependency>
	<groupId>com.github.pagehelper</groupId>
	<artifactId>pagehelper</artifactId>
</dependency>

<!-- 日志 -->
<dependency>
	<groupId>org.slf4j</groupId>
	<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
	<groupId>ch.qos.logback</groupId>
	<artifactId>logback-classic</artifactId>
</dependency>

<!-- 其他日志框架的中间转换包 -->
<dependency>
	<groupId>org.slf4j</groupId>
	<artifactId>jcl-over-slf4j</artifactId>
</dependency>

<!-- Spring进行JSON数据转换依赖 -->
<dependency>
	<groupId>com.fasterxml.jackson.core</groupId>
	<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
	<groupId>com.fasterxml.jackson.core</groupId>
	<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
	<groupId>com.fasterxml.jackson.core</groupId>
	<artifactId>jackson-annotations</artifactId>
</dependency>

<!-- JSTL标签库 -->
<dependency>
	<groupId>jstl</groupId>
	<artifactId>jstl</artifactId>
</dependency>

<!-- 引入Servlet容器中相关依赖 -->
<dependency>
	<groupId>javax.servlet</groupId>
	<artifactId>servlet-api</artifactId>
	<scope>provided</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
	<groupId>com.google.code.gson</groupId>
	<artifactId>gson</artifactId>
</dependency>
创建 jdbc.properties
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
jdbc.user=root
jdbc.password=123456
jdbc.url=jdbc:mysql://localhost:3306/project_crowd?useSSL=false&serverTimezone=UTC&useUnicode=true&characterEncoding=UTF-8
jdbc.driver=com.mysql.cj.jdbc.Driver
创建 mybatis-config.xml
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
		PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
		"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
</configuration>
创建 spring-persist-mybatis.xml
Spring 配置第一步 配置数据源
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">
	<!-- 加载外部属性文件 -->
	<context:property-placeholder location="classpath:jdbc.properties" />

	<!-- 配置数据源 -->
	<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
		<property name="driverClassName" value="${jdbc.driver}" />
		<property name="url" value="${jdbc.url}" />
		<property name="username" value="${jdbc.user}" />
		<property name="password" value="${jdbc.password}" />
	</bean>
</beans>
测试能否连接数据库

若控制台输出 connection,则连接成功

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.atguigu.crowd.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * Copyright (C) 2024 - 2024 Jasonakeke, Inc. All Rights Reserved
 *
 * @Desc :
 * @Time : 2024/11/17 17:13
 * @Author : Code_By_Jasonakeke
 * @Email : 2284037977@qq.com
 * @Class : CrowdTest
 * @IDE : IntelliJ IDEA
 */
// 在类上标记必要的注解
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring-persist-mybatis.xml"})
public class CrowdTest {

	@Autowired
	private DataSource dataSource;

	@Test
	public void test() throws SQLException {
		Connection connection = dataSource.getConnection();
		System.out.println(connection);
	}
}
Spring 配置第二步 配置 SqlSessionFactoryBean 及 MapperScannerConfigurer
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!-- 配置 SqlSessionFactoryBean 整合 MyBatis -->
<bean id="sqlSessionFactoryBean" class="org.mybatis.spring.SqlSessionFactoryBean" >
	<!-- 指定 MyBatis 全局配置文件位置 -->
	<property name="configLocation" value="classpath:mybatis/mybatis-config.xml" />
	<!-- 指定 Mapper.xml 配置文件位置 -->
	<property name="mapperLocations" value="classpath:mybatis/mapper/*Mapper.xml" />
	<!-- 配置数据源  -->
	<property name="dataSource" ref="dataSource" />
</bean>

<!-- 配置 MapperScannerConfigurer 来扫描 Mapper 接口所在的包 -->
<bean id="mapperScannerConfigurer" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
	<property name="basePackage" value="com.atguigu.crowd.mapper" />
</bean>
测试能否插入数据
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
package com.atguigu.crowd.test;

import com.atguigu.crowd.entity.Admin;
import com.atguigu.crowd.mapper.AdminMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


/**
 * Copyright (C) 2024 - 2024 Jasonakeke, Inc. All Rights Reserved
 *
 * @Desc :
 * @Time : 2024/11/17 17:13
 * @Author : Code_By_Jasonakeke
 * @Email : 2284037977@qq.com
 * @Class : CrowdTest
 * @IDE : IntelliJ IDEA
 */
// 在类上标记必要的注解
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:spring-persist-mybatis.xml", "classpath:spring-persist-tx.xml"})
public class CrowdTest {

	@Autowired
	private AdminMapper adminMapper;

	@Test
	public void testInsertAdmin() {
		Admin admin = new Admin(null, "tom", "123456", "汤姆", "tom@atguigu.com", null);
		int count = adminMapper.insert(admin);
		System.out.println("受影响行数:" + count);
	}
}

日志系统

意义

项目日志系统在现代项目管理中扮演着至关重要的角色。它不仅是记录项目进展、问题和解决方案的工具,还是团队协作、决策支持和项目回顾的重要基础。

  1. 记录项目进展
    • 项目日志系统能够实时、详细地记录项目的各个阶段和任务的完成情况。
    • 这有助于团队成员和项目经理了解项目的当前状态,确保所有工作都在预定的时间表和预算内进行。
  2. 跟踪问题和风险
    • 通过日志系统,团队成员可以记录在项目执行过程中遇到的各种问题和风险。
    • 这些问题和风险可以被分类、优先级排序,并关联到具体的任务或阶段,以便进行后续跟踪和解决。
  3. 促进团队协作
    • 项目日志系统通常具有协作功能,如评论、点赞和分享等,这有助于增强团队成员之间的沟通和协作。
    • 团队成员可以实时查看彼此的日志,了解各自的工作进展和遇到的问题,从而更加紧密地合作。
  4. 提供决策支持
    • 项目经理和决策层可以通过日志系统获取项目的全面信息,包括进度、成本、质量和风险等方面。
    • 这些信息为决策提供了有力的数据支持,有助于项目经理做出更加明智的决策。
  5. 便于项目回顾和总结
    • 在项目结束后,项目日志系统可以作为项目回顾和总结的重要参考。
    • 通过查看日志,团队成员可以了解项目的成功经验和不足之处,为未来的项目提供宝贵的经验和教训。
  6. 提高项目透明度
    • 项目日志系统增加了项目的透明度,使得所有相关方都能够清晰地了解项目的进展和状态。
    • 这有助于建立信任,减少误解和冲突,提高项目的整体效率和质量。
  7. 支持持续改进
    • 通过分析项目日志中的数据,团队可以识别出项目中的瓶颈、低效环节和潜在改进点。
    • 这些信息为项目的持续改进提供了有力的支持,有助于团队不断优化项目管理流程和方法。

综上所述,项目日志系统在项目管理中具有不可替代的作用。它不仅能够提高项目的执行效率和质量,还能够促进团队协作和决策支持,为项目的成功提供有力的保障。因此,在项目管理中,建立和维护一个有效的项目日志系统是非常重要的。

具体操作

加入 slf4j + logback

将 atcrowdfunding03-admin-component 模块中之前日志相关的依赖全部删去,然后加入 slf4j+logback 依赖

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<dependency>
	<groupId>org.slf4j</groupId>
	<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
	<groupId>ch.qos.logback</groupId>
	<artifactId>logback-classic</artifactId>
</dependency>
主动打印日志的方法
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
@Test
public void testLog(){
	// 1.获取 Logger 对象
	Logger logger = LoggerFactory.getLogger(CrowdTest.class);

	// 2.根据不同日志级别,打印不同级别的日志
	logger.debug("这是 DEBUG 级别的日志");
	logger.info("这是 INFO 级别的日志");
	logger.warn("这是 WARN 级别的日志");
	logger.error("这是 ERROR 级别的日志");
}
更换框架的日志系统
  1. 排除 commons-logging
  2. 加入转换包(atcrowdfunding03-admin-component 模块)
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<dependency>
	<groupId>org.slf4j</groupId>
	<artifactId>jcl-over-slf4j</artifactId>
</dependency>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-11-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
网站安全防护指南
1、什么是网站入侵及Web攻击? 3分钟了解网站入侵及防护问题 :https://cloud.tencent.com/developer/article/1330366 ---- 2、 网站遭到SQL注入、XSS攻击等Web攻击,造成入侵事件怎么办? 在网站及Web业务的代码设计、开发、发布、流程中纳入安全设计及漏洞审查,避免Web漏洞暴露造成风险 建议接入腾讯云网站管家WAF服务,对Web攻击行为进行拦截 建议使用腾讯云Web漏洞扫描业务,在网站及Web业务变更及版本迭代时,扫描发现Web漏洞,并依照
腾讯云基础安全
2018/09/12
6.8K1
网站安全防护指南
主机安全防护:腾讯云云镜产品
腾讯云云镜是基于AI算法的轻量化主机安全软件,帮助用户解决木马感染(勒索,被篡改),被入侵(挖矿,数据窃取),漏洞,登陆密码爆破等主机安全问题。了解云镜: https://cloud.tencent.com/product/hs
腾讯云基础安全
2018/09/09
7K0
主机安全防护:腾讯云云镜产品
主机安全(云镜)产品简介
安全没有绝对,如何保护好企业的数据安全是摆在管理员面前的一道难题,根据个经历可以分以下两个方面来提升企业的安全等级。
研究僧
2020/05/03
8.7K2
腾讯云2024双11大促:主机安全最佳实践
腾讯云2024双11大促已正式开始,在这场活动中,腾讯云为用户带来了超值福利,其中云计算产品就包括云服务器CVM和轻量应用服务器,这两者产品拥有不同的使用场景。
参谋带个长
2024/11/14
3.2K0
腾讯云2024双11大促:主机安全最佳实践
应急响应案例:木马清理
pwnriglhttps.service 存在异常,该木马在6月2日就已经存在了。
何刚
2020/10/29
3K0
应急响应案例:木马清理
【主机安全】网站中木马首页被篡改怎么办
1、原先的首页文件被删除并替换成一个静态文件,如index.html、default.html、index.thm、default.htm。
参谋带个长
2024/06/19
4110
多个黑产团伙利用向日葵远控软件RCE漏洞攻击传播
近日,腾讯安全威胁情报中心检测到有挖矿、远控黑产团伙利用向日葵远控软件RCE漏洞攻击企业主机和个人电脑,已有部分未修复漏洞的主机、个人电脑受害。攻击者利用漏洞入侵后可直接获得系统控制权,受害主机已被用于门罗币挖矿。
腾讯安全
2022/03/22
9.4K0
【云安全最佳实践】如何实现腾讯云上双11-12主机安全防护?
近期小编发现很多小伙伴项目沟通反馈,非常大安全攻击都是由于公网和内部管理问题导致、端口暴露、SQL注入、暴力破解、CC共计、数据删除、勒索木马病毒、CPU/内存爆满100%,无法ssh登陆机器,机器卡死等等一系列安全问题,特分享以下安全建议,供技术交流探讨,谢谢
TCS-F
2022/10/31
36.9K1
【云安全最佳实践】如何实现腾讯云上双11-12主机安全防护?
云安全风险可视及威胁预警:腾讯云态势感知
云上安全数据繁多,安全风险不可视。腾讯云态势感知服务将帮助用户实现安全数据可视化,发现潜在的外部和内部的风险,预测即将发生的安全威胁。腾讯云态势感知当前版本提供给腾讯云用户无限期免费使用,您可在态势感知官网页面申请: https://console.cloud.tencent.com/ssa
腾讯云基础安全
2018/09/09
4.8K0
云安全风险可视及威胁预警:腾讯云态势感知
木马围城:比特币爆涨刺激挖矿木马一拥而上围猎肉鸡资源
云主机是企业数字化转型的重要基础设施,承载着重要的数据和服务价值,也逐渐成为了黑客的重点攻击对象。随着虚拟机、云主机、容器等技术的普遍应用,传统安全边界逐渐模糊,网络环境中的主机资产盲点成倍增加,黑客入侵、数据泄露、病毒木马攻击风险随之增加。 与此同时,各类数字加密货币价格迎来暴涨,2020年初至今,比特币价格一度超过了4万美元/BTC,是2019年底的10倍之多,达到了历史最高点,比特币一度摘取2020年度最佳持有资产的头衔。受比特币暴涨影响,各类数字虚拟币市值均有大幅增长,在如此大利益诱惑之下,通过传播挖矿木马来获取数字加密货币(以挖取门罗币最为普遍)的黑产团伙闻风而动,纷纷加入对主机计算资源的争夺之战。
Kendiv
2021/01/13
27.4K14
木马围城:比特币爆涨刺激挖矿木马一拥而上围猎肉鸡资源
云主机安全容灾建设
Integrity(完整性):指信息在输入和传输的过程中,不被非法授权修改和破坏,保证数据的一致性。
枪哥四海为家
2021/06/30
2.8K0
云主机安全容灾建设
腾讯云主机安全暴力破解测试
1、两台云服务器,一台升级为主机安全专业版或者旗舰版(暴力破解阻断功能需要专业版或者旗舰版)
二货哈
2022/03/23
8.1K0
3分钟了解主机安全问题
《碟中谍4》中,位于迪拜塔137层的数据中心,网络防火墙是军用级别口令和硬件网关,破解防护困难。于是阿汤哥只身从130楼爬到137楼,进入数据中心,绕过防护设备,最终黑掉了迪拜塔的数据中心。这里,我们看下入侵数据中心中心的思路:
腾讯云基础安全
2018/09/07
2.9K0
3分钟了解主机安全问题
【安全】勒索病毒-云上通用安全防护加固策略配置-必读!
免费云监控:云监控 _ 云产品数据监控_云产品异常告警 - 腾讯云 (tencent.com)
TCS-F
2021/10/27
1.6K0
【安全】勒索病毒-云上通用安全防护加固策略配置-必读!
云主机安全 - 基础篇
云厂商提供的按需按量付费的云主机,对中小企业、个人用户来说,其低成本、高可靠以及易管理性,是非常有吸引力的,但是,千万别忽视云主机面临的安全威胁 -- 公有云上庞大的云主机群,也是黑产持续关注的热点区域,今天我们来聊聊,从普通用户角度,有哪些办法可以快速提升云主机的安全性。
Kendiv
2020/10/29
17.2K0
腾讯云主机安全试用体验
可以在https://buy.cloud.tencent.com/yunjing下单
相柳
2024/12/09
2.7K0
腾讯云主机安全试用体验
喜报!腾讯云主机安全入选Gartner CWPP全球市场指南
随着万物网联和企业上云成为了主流趋势,对于正在数字化转型的企业而言,主机作为承载数据资产和业务管理的基础设施,其安全防护重要性日益凸显;与此同时,虚拟机、云主机、容器等技术的落地,也在打破虚拟和现实的安全边界,使主机面临的风险和挑战更加多元化。
腾讯安全
2020/05/06
2.2K0
喜报!腾讯云主机安全入选Gartner CWPP全球市场指南
某软件疑似漏洞导致勒索事件——用户处置手册
2022.8.29 陆续收到客户反馈服务器被勒索,勒索病毒入侵事件2022.8.28 03 PM 开始,通过分析发现客户均使用了某SaaS软件系统,初步怀疑可能是系统存在漏洞导致。
腾讯云安全中心
2022/08/31
2.5K0
经常中木马怎么解决?@腾讯云服务器
您的服务器 172.21.0.2(腾讯云账号ID:100005850393 账号昵称:魏江龙 instance-id:ins-dypru50t 地域:北京) 检测到存在未处理的 C:/ProgramData/SQLAGENTSIE.exe 木马文件。您的服务器疑似被黑客入侵,可能造成严重损失,请即刻前往云镜控制台查看详细信息。
用户2251170
2019/06/25
8.2K0
腾讯云主机安全最佳使用指南-无懈可击的服务器防御配置
https://console.cloud.tencent.com/cwp/ptcenter
枪哥四海为家
2023/03/04
4.3K0
腾讯云主机安全最佳使用指南-无懈可击的服务器防御配置
推荐阅读
相关推荐
网站安全防护指南
更多 >
LV.1
腾讯高级产品经理
目录
  • 环境搭建总体目标
  • 创建工程
    • 系统架构图
    • 工程创建计划
    • 创建空项目
      • 创建对应的 Maven 模块
      • 建立模块间的依赖
  • 创建数据库
  • 基于 Maven 的 Mybatis 的逆向过程
    • 配置 pom
    • 创建 generatorConfig.xml
    • 执行逆向工程操作的 maven 指令
    • 将逆向工程生成的资源归位
  • 父工程依赖管理
  • 版本声明
  • 依赖管理
  • Spring 整合 MyBatis
    • 思路
    • 具体操作
      • 在子工程中加入搭建环境的所需的具体依赖
      • 创建 jdbc.properties
      • 创建 mybatis-config.xml
      • 创建 spring-persist-mybatis.xml
      • Spring 配置第一步 配置数据源
      • 测试能否连接数据库
      • Spring 配置第二步 配置 SqlSessionFactoryBean 及 MapperScannerConfigurer
      • 测试能否插入数据
  • 日志系统
    • 意义
    • 具体操作
      • 加入 slf4j + logback
      • 主动打印日志的方法
      • 更换框架的日志系统
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档