zxpnet网站 zxpnet网站
首页
前端
后端服务器
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

zxpnet

一个爱学习的java开发攻城狮
首页
前端
后端服务器
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • idea ide安装
  • ssh常用软件
  • typora安装与使用
  • sts安装
    • sts4安装
    • 安装lombok插件
    • 安装drools插件
    • 部署到tomcat
      • 1、添加server,并配置好参数
      • 2、设置web.xml
      • 3、更改项目packaging为war类型
      • 4、设置插件
    • 常见问题的设置
      • 1、console buffer size too low
      • 2、WebappStructureSerializer错误
      • 3、启动时报JAXBException异常
      • 4、代码提示报错
  • git使用
  • jenkins基础
  • 黑客攻防
  • Docker安装centos7服务器常用软件
  • 软件小技巧
  • notepad小技巧
  • nginx配置
  • 百度网盘不限流
  • win10常用软件安装
  • 内网穿透软件
  • 常用浏览器的安装与使用
  • 数据库设计软件
  • ftp服务器
  • windows中制作cmd脚本
  • 安装vscode
  • soft
shollin
2021-11-15
目录

sts安装

  • sts4安装
  • 安装lombok插件
  • 安装drools插件
  • 部署到tomcat
    • 1、添加server,并配置好参数
    • 2、设置web.xml
    • 3、更改项目packaging为war类型
    • 4、设置插件
  • 常见问题的设置
    • 1、console buffer size too low
    • 2、WebappStructureSerializer错误
    • 3、启动时报JAXBException异常
    • 4、代码提示报错

# sts4安装

Spring | Tools (opens new window)下载解压运行即可

# 安装lombok插件

双击lombok.jar, 选择好SpringToolSuite4.exe进行安装即可,会修改SpringToolSuite4.ini最后面的文件, 添加-vmargs参数

-illegal-access=permit
-javaagent:D:\app\sts-4.12.1.RELEASE\plugins\org.projectlombok.agent_1.18.22/lombok.jar
1
2

或者用网址来安装: https://projectlombok.org/p2

Spring Tool Suite (projectlombok.org) (opens new window)

# 安装drools插件

参考官方文档:Drools - Download (opens new window)

升级url: https://download.jboss.org/drools/release/7.46.0.Final/org.drools.updatesite/,安装插件后,还需下载Drools Engine及指定drools的运行目录

插件版本只到7.46.0.Final

image-20211218143718086

参考: Drools7.12.0教程:Eclipse中安装Drools插件和Drools 运行时 (opens new window)

# 部署到tomcat

# 1、添加server,并配置好参数

image-20211120143835559

# 2、设置web.xml

<failOnMissingWebXml>false</failOnMissingWebXml>
<maven.test.skip>true</maven.test.skip>
1
2

# 3、更改项目packaging为war类型

<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<!-- 移除嵌入式tomcat插件 -->
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-tomcat</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
<!--设置Tomcat不打包进去-->
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-tomcat</artifactId>
  <scope>provided</scope>
</dependency> 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# 4、设置插件

<plugins>
	<!-- 升级war打包的插件版本 -->
		<plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-war-plugin</artifactId>
		        <version>3.3.1</version>
	      	</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<includeSystemScope>true</includeSystemScope>
					<fork>true</fork>
					<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
				</configuration>
			</plugin>
			<plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-compiler-plugin</artifactId>
            	<version>3.8.1</version>
	            <configuration>
	            	<skip>true</skip>
	            	<source>${java.version}</source> <!-- depending on your project -->
                	<target>${java.version}</target> 
	                <annotationProcessorPaths>
	                    <path>
	                        <groupId>org.mapstruct</groupId>
	                        <artifactId>mapstruct-processor</artifactId>
	                        <version>${mapstruct.version}</version>
	                    </path>
	                </annotationProcessorPaths>
	            </configuration>
	        </plugin>
	        
	        <!-- 打包时跳过测试 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
		</plugins>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

参考: springboot项内置Tomcat和外置Tomcat的两种打包方式_zhou_fan_xi的博客-CSDN博客 (opens new window)

# 常见问题的设置

# 1、console buffer size too low

Windows > Perferences > Run/Debug > Console 设置成100W就可以

# 2、WebappStructureSerializer错误

升级war的打包版本就可以

Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer报错处理_XinSKY丶TOT的博客-CSDN博客 (opens new window)

# 3、启动时报JAXBException异常

问题解决:Java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException_keisunique-CSDN博客 (opens new window)

# 4、代码提示报错

image-20211215111411646

typora安装与使用
git使用

← typora安装与使用 git使用→

最近更新
01
国际象棋
09-15
02
成语
09-15
03
自然拼读
09-15
更多文章>
Theme by Vdoing | Copyright © 2019-2023 zxpnet | 粤ICP备14079330号-1
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式