maven

SpringBoot热部署的两种方式

落爺英雄遲暮 提交于 2021-02-09 15:33:05
SpringBoot热部署方式一共有两种,分别使用两种不同的依赖   SpringBoot 1.3后才拥有SpringBoot devtools热部署   ①:spring-boot-devtools ②:Spring Loaded   方式一:     在项目的pom文件中添加依赖: 1 <!--热部署jar--> 2 <dependency> 3 <groupId>org.springframework.boot</groupId> 4 <artifactId>spring-boot-devtools</artifactId> 5 </dependency>     然后:使用 shift+ctrl+alt+"/" (IDEA中的快捷键) 选择"Registry" 然后勾选 compiler.automake.allow.when.app.running   方式二:     在项目中添加如下代码 <build> <plugins> <plugin> <!-- springBoot编译插件--> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <dependencies> <!-- spring热部署 --> <!--

带你认识互联网架构的演变过程

六眼飞鱼酱① 提交于 2021-02-09 13:53:04
单体架构(all in one) 所有模块都在一起,技术也不分层。 在单机上部署所有的应用程序和软件。 所有的代码都写在JSP里面,所有代码都写在一起,这种方式称为all in one。 特点: 1.不具备代码的可维护性。 2.容错性差。(容错性是指软件检测应用程序所运行的软件和硬件中发生的错误并从错误中恢复的能力,可以从系统的可靠性,可用性,可测性等几个方面衡量) 因为所有代码都写在JSP页面里,当因为用户或某些原因发生异常时:用户可以直接看到异常错误信息;异常会导致服务器宕机。 单体地狱: 只需一个应用,将所有功能部署在一起,以减少部署节点和成本。 解决方案 1.分层开发:解决单体架构容错性差的问题,同时提高了代码的维护性。 2.MVC架构(Web应用程序的设计模式) 3.服务器的部署分离。 特点: 1.MVC分层开发:解决容错性问题。 2.数据库和项目部署分离。 <font color=red>问题</font>: 1.高并发:随着用户访问量的持续增加,单台服务器无法满足用户访问需求。 解决方案: 1.集群 集群操作可能遇到的问题 高可用 高可用HA(High Availability)是分布式系统架构设计中必须考虑的因素之一,它通常是指,通过设计减少系统不能提供服务的时间。假设系统一直能够提供服务,我们说系统的可用性是100%。 如何保证高可用:避免单点。 高并发 高并发

Maven Repositories for Spring Roo

≯℡__Kan透↙ 提交于 2021-02-09 11:59:06
问题 My intent is to proxy Roo Maven repository with my local Nexus installation, so that it will contain Roo 1.2.0.RELEASE packages. On http://static.springsource.org/spring-roo/reference/html/resources.html it is written that Roo builds are published on http://spring-roo-repository.springsource.org/release. Unfortunately that link returns error NoSuchKey . Is there some other Maven repository to get Roo packages from ? 回答1: Create (in Nexus) a proxy repository with the remote storage location =

Class Not Found Exception for a Maven Jar

♀尐吖头ヾ 提交于 2021-02-09 11:09:50
问题 I use maven to manage dependency in my project. This is my pom.xml pom.xml <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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.prasanna</groupId> <artifactId>fft-java</artifactId> <version>1.0.0</version> <packaging>jar</packaging> <name>fft-java</name> <url>http://maven.apache.org</url>

Class Not Found Exception for a Maven Jar

此生再无相见时 提交于 2021-02-09 11:08:11
问题 I use maven to manage dependency in my project. This is my pom.xml pom.xml <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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.prasanna</groupId> <artifactId>fft-java</artifactId> <version>1.0.0</version> <packaging>jar</packaging> <name>fft-java</name> <url>http://maven.apache.org</url>

Class Not Found Exception for a Maven Jar

走远了吗. 提交于 2021-02-09 11:07:47
问题 I use maven to manage dependency in my project. This is my pom.xml pom.xml <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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.prasanna</groupId> <artifactId>fft-java</artifactId> <version>1.0.0</version> <packaging>jar</packaging> <name>fft-java</name> <url>http://maven.apache.org</url>

Could not find artifact com.sun:tools:jar:1.7 [duplicate]

这一生的挚爱 提交于 2021-02-09 10:52:53
问题 This question already has answers here : Missing artifact com.sun:tools:jar (24 answers) Closed 2 years ago . Here is my pom.xml <project ... > <modelVersion>4.0.0</modelVersion> <groupId>io.fabric8</groupId> <artifactId>kubernetes-alexa</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <!-- lambda --> <lambda.functionCode>${project.build.directory}/$

如何使用SpringBoot AOP 记录操作日志、异常日志?

冷暖自知 提交于 2021-02-09 09:56:10
点击上方“ 全栈程序员社区 ”,星标公众号 重磅干货,第一时间送达 作者: 咫尺的梦想_w cnblogs.com/wm-dv/p/11735828.html 平时我们在做项目时经常需要对一些重要功能操作记录日志,方便以后跟踪是谁在操作此功能;我们在操作某些功能时也有可能会发生异常,但是每次发生异常要定位原因我们都要到服务器去查询日志才能找到,而且也不能对发生的异常进行统计,从而改进我们的项目,要是能做个功能专门来记录操作日志和异常日志那就好了。 当然我们肯定有方法来做这件事情,而且也不会很难,我们可以在需要的方法中增加记录日志的代码,和在每个方法中增加记录异常的代码,最终把记录的日志存到数据库中。听起来好像很容易,但是我们做起来会发现,做这项工作很繁琐,而且都是在做一些重复性工作,还增加大量冗余代码,这种方式记录日志肯定是不可行的。 我们以前学过Spring 三大特性,IOC(控制反转),DI(依赖注入),AOP(面向切面),那其中AOP的主要功能就是将日志记录,性能统计,安全控制,事务处理,异常处理等代码从业务逻辑代码中划分出来。今天我们就来用springBoot Aop 来做日志记录,好了,废话说了一大堆还是上货吧。 一、创建日志记录表、异常日志表,表结构如下: 操作日志表 异常日志表 二、添加Maven依赖 < dependency > < groupId > org

Maven project builds but dependencies seem to be unavailable in IntelliJ IDEA

时光总嘲笑我的痴心妄想 提交于 2021-02-09 09:33:11
问题 I have a multi-level Maven project that builds fine on the command-line using mvn clean install and builds in IntelliJ IDEA (2019.3) by manually running the parent project's clean and install phase. The Problems view shows nothing wrong. When I open files that have certain external libraries, they show as being unable to be resolved: I'm usually able to browse external libraries' contents in the project browser. I've noticed that these external libraries IntelliJ can't find are listed but not

Maven project builds but dependencies seem to be unavailable in IntelliJ IDEA

扶醉桌前 提交于 2021-02-09 09:33:10
问题 I have a multi-level Maven project that builds fine on the command-line using mvn clean install and builds in IntelliJ IDEA (2019.3) by manually running the parent project's clean and install phase. The Problems view shows nothing wrong. When I open files that have certain external libraries, they show as being unable to be resolved: I'm usually able to browse external libraries' contents in the project browser. I've noticed that these external libraries IntelliJ can't find are listed but not