精华内容
下载资源
问答
  • 初学Spring Boot,启动时失败: ** WARNING ** :Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package. org.springframework.beans.factory....

    初学Spring Boot,启动时失败:

    ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/C:/Users/cmc/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.2.5.RELEASE/spring-boot-autoconfigure-1.2.5.RELEASE.jar!/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$JdbcTemplateConfiguration.class]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$JdbcTemplateConfiguration due to internal class not found. This can happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)

    CSDN小伙伴提出的解决方案:

    查了半天终于才stack overflow上看到了解决方案,链接如下:stack overflow
    是因为application.java 文件不能直接放在main/java文件夹下,必须要建一个包把他放进去

    官方文档有一小段说明:

    When a class does not include a package declaration, it is considered to be in the “default package”. The use of the “default package” is generally discouraged and should be avoided. It can cause particular problems for Spring Boot applications that use the @ComponentScan@EntityScan, or @SpringBootApplicationannotations, since every class from every jar is read.


    记录一下学习中遇到的问题踩过的坑

    展开全文
  • spring-boot-maven-plugin 下载失败 下载不了 Kaki的博客 解决方式1: 检测maven 版本是否大于3.3.6版本 settings.xml文件的远程仓库修改成阿里的,以下是我的settings.xml可以直接cv到你的本地 <?xml version=...

    spring-boot-maven-plugin 下载失败 下载不了 Kaki的博客

    解决方式1:

    • 检测maven 版本是否大于3.3.6版本
    • settings.xml文件的远程仓库修改成阿里的,以下是我的settings.xml可以直接cv到你的本地
    <?xml version="1.0" encoding="UTF-8"?>
    
    <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
    
    <!--
     | This is the configuration file for Maven. It can be specified at two levels:
     |
     |  1. User Level. This settings.xml file provides configuration for a single user,
     |                 and is normally provided in ${user.home}/.m2/settings.xml.
     |
     |                 NOTE: This location can be overridden with the CLI option:
     |
     |                 -s /path/to/user/settings.xml
     |
     |  2. Global Level. This settings.xml file provides configuration for all Maven
     |                 users on a machine (assuming they're all using the same Maven
     |                 installation). It's normally provided in
     |                 ${maven.home}/conf/settings.xml.
     |
     |                 NOTE: This location can be overridden with the CLI option:
     |
     |                 -gs /path/to/global/settings.xml
     |
     | The sections in this sample file are intended to give you a running start at
     | getting the most out of your Maven installation. Where appropriate, the default
     | values (values used when the setting is not specified) are provided.
     |
     |-->
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
      <!-- localRepository
       | The path to the local repository maven will use to store artifacts.
       |
       | Default: ${user.home}/.m2/repository
      <localRepository>/path/to/local/repo</localRepository>
      -->
         <localRepository>D:\newDevalop\reponsitory_boot</localRepository>
      <!-- interactiveMode
       | This will determine whether maven prompts you when it needs input. If set to false,
       | maven will use a sensible default value, perhaps based on some other setting, for
       | the parameter in question.
       |
       | Default: true
      <interactiveMode>true</interactiveMode>
      -->
    
      <!-- offline
       | Determines whether maven should attempt to connect to the network when executing a build.
       | This will have an effect on artifact downloads, artifact deployment, and others.
       |
       | Default: false
      <offline>false</offline>
      -->
    
      <!-- pluginGroups
       | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
       | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
       | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
       |-->
      <pluginGroups>
        <!-- pluginGroup
         | Specifies a further group identifier to use for plugin lookup.
        <pluginGroup>com.your.plugins</pluginGroup>
        -->
      </pluginGroups>
    
      <!-- proxies
       | This is a list of proxies which can be used on this machine to connect to the network.
       | Unless otherwise specified (by system property or command-line switch), the first proxy
       | specification in this list marked as active will be used.
       |-->
      <proxies>
        <!-- proxy
         | Specification for one proxy, to be used in connecting to the network.
         |
        <proxy>
          <id>optional</id>
          <active>true</active>
          <protocol>http</protocol>
          <username>proxyuser</username>
          <password>proxypass</password>
          <host>proxy.host.net</host>
          <port>80</port>
          <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
        </proxy>
        -->
      </proxies>
    
      <!-- servers
       | This is a list of authentication profiles, keyed by the server-id used within the system.
       | Authentication profiles can be used whenever maven must make a connection to a remote server.
       |-->
      <servers>
        <!-- server
         | Specifies the authentication information to use when connecting to a particular server, identified by
         | a unique name within the system (referred to by the 'id' attribute below).
         |
         | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are
         |       used together.
         |
        <server>
          <id>deploymentRepo</id>
          <username>repouser</username>
          <password>repopwd</password>
        </server>
        -->
    
        <!-- Another sample, using keys to authenticate.
        <server>
          <id>siteServer</id>
          <privateKey>/path/to/private/key</privateKey>
          <passphrase>optional; leave empty if not used.</passphrase>
        </server>
        һ¼üɏ´«˽·þ
    	      <server>
    		<id>releases</id>
    		<username>admin</username>
    		<password>admin123</password>
    	</server>
    	<server>
    		<id>snapshots</id>
    		<username>deployment</username>
    		<password>deployment123</password>
    	</server>
      </servers>
    	
    	
    	-->
    	
    	
    	
      </servers>
    
      <!-- mirrors
       | This is a list of mirrors to be used in downloading artifacts from remote repositories.
       |
       | It works like this: a POM may declare a repository to use in resolving certain artifacts.
       | However, this repository may have problems with heavy traffic at times, so people have mirrored
       | it to several places.
       |
       | That repository definition will have a unique id, so we can create a mirror reference for that
       | repository, to be used as an alternate download site. The mirror site will be the preferred
       | server for that repository.
       |-->
      <mirrors>
        <!-- mirror
         | Specifies a repository mirror site to use instead of a given repository. The repository that
         | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
         | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
         |
        <mirror>
          <id>mirrorId</id>
          <mirrorOf>repositoryId</mirrorOf>
          <name>Human Readable Name for this Mirror.</name>
          <url>http://my.repository.com/repo/path</url>
        </mirror>
    	˽·þ¾µϱ
    	 <mirror>
          <id>nexus</id>
          <mirrorOf>*</mirrorOf>
          <url>http://127.0.0.1:8089/nexus/content/groups/public/</url>
    	</mirror>http://maven.aliyun.com/nexus/content/groups/public/
    	°¢À¾µϱ
    	
    	
    	<mirror>
          <id>nexus</id>
          <mirrorOf>*</mirrorOf>
          <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    	</mirror>
    	
    	-->
    
    	  	 <mirror>
                 <id>alimaven</id>
                <mirrorOf>central</mirrorOf>
                <name>aliyun maven</name>
                 <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
             </mirror>
    	
      </mirrors>
    
      <!-- profiles
       | This is a list of profiles which can be activated in a variety of ways, and which can modify
       | the build process. Profiles provided in the settings.xml are intended to provide local machine-
       | specific paths and repository locations which allow the build to work in the local environment.
       |
       | For example, if you have an integration testing plugin - like cactus - that needs to know where
       | your Tomcat instance is installed, you can provide a variable here such that the variable is
       | dereferenced during the build process to configure the cactus plugin.
       |
       | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
       | section of this document (settings.xml) - will be discussed later. Another way essentially
       | relies on the detection of a system property, either matching a particular value for the property,
       | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a
       | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
       | Finally, the list of active profiles can be specified directly from the command line.
       |
       | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
       |       repositories, plugin repositories, and free-form properties to be used as configuration
       |       variables for plugins in the POM.
       |
       |-->
      <profiles>
        <!-- profile
         | Specifies a set of introductions to the build process, to be activated using one or more of the
         | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
         | or the command line, profiles have to have an ID that is unique.
         |
         | An encouraged best practice for profile identification is to use a consistent naming convention
         | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
         | This will make it more intuitive to understand what the set of introduced profiles is attempting
         | to accomplish, particularly when you only have a list of profile id's for debug.
         |
         | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
        <profile>
          <id>jdk-1.4</id>
    
          <activation>
            <jdk>1.4</jdk>
          </activation>
    
          <repositories>
            <repository>
              <id>jdk14</id>
              <name>Repository for JDK 1.4 builds</name>
              <url>http://www.myhost.com/maven/jdk14</url>
              <layout>default</layout>
              <snapshotPolicy>always</snapshotPolicy>
            </repository>
          </repositories>
        </profile>
        -->
    
        <!--
         | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
         | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
         | might hypothetically look like:
         |
         | ...
         | <plugin>
         |   <groupId>org.myco.myplugins</groupId>
         |   <artifactId>myplugin</artifactId>
         |
         |   <configuration>
         |     <tomcatLocation>${tomcatPath}</tomcatLocation>
         |   </configuration>
         | </plugin>
         | ...
         |
         | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
         |       anything, you could just leave off the <value/> inside the activation-property.
         |
        <profile>
          <id>env-dev</id>
    
          <activation>
            <property>
              <name>target-env</name>
              <value>dev</value>
            </property>
          </activation>
    
          <properties>
            <tomcatPath>/path/to/tomcat/instance</tomcatPath>
          </properties>
        </profile>
        -->
    	
    	
      
    	
      </profiles>
    
      <!-- activeProfiles
       | List of profiles that are active for all builds.
       |
      <activeProfiles>
        <activeProfile>alwaysActiveProfile</activeProfile>
        <activeProfile>anotherAlwaysActiveProfile</activeProfile>
      </activeProfiles>
      -->
    </settings>
    
    

    解决方式2:

    • 删除本地仓库中的spring-boot-maven-plugin,之后重新下载
      在这里插入图片描述

    解决方式3:
    - 先执行mvn clean 在install
    在这里插入图片描述
    希望能够帮助到你,谢谢!

    展开全文
  • 以前还是好用的,今天创建新的spring boot的时候发现电脑上所有版本的eclipse都无法连接网络了,全是check Internet connection,我防火墙也关了还是不好用
  • spring boot service注入失败

    千次阅读 2017-04-23 20:17:45
    spring boot service注入失败,空指针异常

    今天遇到了service注入失败,遇到空指针异常

    Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

    ConnDB类使用service注入,jdbc连接数据库,但在主程序中将其实例化后无法调用函数,报空指针异常,检查后发现实例化的需要添加Autowired注解

    @Service
    public class ConnDB {
        @Autowired
        JdbcTemplate jdbcTemplate;
    
        public void insert(String serverAd, String chaincodeId, String invokeId, String invokeTime){
            String sql = "insert into tran_data values(\'"+serverAd+"\',\'"+chaincodeId+"\',\'"+invokeId+"\',\'"+invokeTime+"\',"+0+")";
            System.out.println(sql);
            jdbcTemplate.execute(sql);
        }
    }

    Controller:

    @Autowired
    private ConnDB connDB;


    展开全文
  • SrpingBoot,SpringCloud 项目导入spring-boot-starter-amqp依赖下载失败 项目场景: SrpingBoot,SpringCloud 项目导入spring-boot-starter-amqp依赖下载失败 maven代码如下: <!--amqp--> <dependency&...

    SrpingBoot,SpringCloud 项目导入spring-boot-starter-amqp依赖下载失败

    项目场景:

    SrpingBoot,SpringCloud 项目导入spring-boot-starter-amqp依赖下载失败

    maven代码如下:

    	<!--amqp-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
    

    问题描述:

    在这里插入图片描述

    原因分析:

    我项目中的maven配置的是阿里云的仓库,但是阿里云仓库中关于springcloud的jar包不完整,需要改为国外的下载地址。

    解决方案:

    1、找到Maven的settings.xml文件
    在这里插入图片描述

    2、修改文件中标签中标签,这个标签的值可以是*,central,Maven。*的意思是只在此镜像地址进行下载,如果不能正常下载,可以修改·标签为central或者Maven。
    在这里插入图片描述
    代码如下

    nexus-aliyun Maven Nexus aliyun https://maven.aliyun.com/repository/public
    展开全文
  • IDEA中Maven依赖下载失败解决方案

    万次阅读 多人点赞 2019-09-24 21:05:20
    使用IDEA进行Maven项目开发时,时不时会遇到pom.xml报错的情况,其中很大概率是因为Maven依赖的jar包下载失败,找来找去也没有找到是什么问题,困扰了很多程序猿,这里给出IDEA中Maven依赖下载失败解决方案,给大家...
  • 前段时间,部门决定重新搭建新框架,转为现在火热的spring boot。由于之前没有接触过,因此自己在网上找资料学习,学习初期,搭建工程项目时遇到了一个问题:按照教程步骤,在...spring boot是通过maven下载jar包的...
  • spring boot启动失败原因: 本文想做一个系统管理,在spring boot下进行开发,但是提交代码时出现启动失败,上网搜索发现各种原因主要包括: 1 说 @EnableAutoConfiguration 注解没加. 2 说 @SpringBootApplication ...
  • idea spring boot启动失败

    2018-12-05 16:55:23
    每次启动spring boot都自动停止了,提示Disconnected from the target VM, address: '127.0.0.1:XXXXX', transport: 'socket',每次端口都不一样,重启idea杀掉后台进程都不行,不知道为什么,新建一个空项目也是...
  • 当spring boot 启动失败,返回信息只有 Process finished with exit code 0 我们可以在启动的main函数加上异常捕获 try { SpringApplication.run(TiangongSpringBootDemoApplication.class, args); } catch ...
  • pom.xml中添加如下代码: <repositories> <repository> <id>spring-snapshots</id> <url>http://repo.spring.io/libs-snapshot</url> </...
  • u-boot版本: v2009.08 在调试其他功能时增加了u-boot.bin容量到1M,使用fastboot download时提示: sending 'bootloader' (1191 KB)... OKAY [ 1.062s] writing 'bootloader'... FAILED (remote: image too large ...
  • Spring boot Dao注入失败的问题解决

    万次阅读 2019-08-31 11:07:52
    Spring Boot Dao层注入失败的几种解决办法 今天在搭建Springboot框架的时候,遇到一一系列问题,最让人恶心的就是service注入dao失败,这个问题找了很久,翻遍了网上好多博客,最后总结一下!!!! 问题一 这种问题...
  • # 第一次构建Spring Boot 项目。 我在http://start.spring.io/上直接一键生成Spring Boot项目。导入eclipse后报错。 ![图片说明](https://img-ask.csdn.net/upload/201807/27/1532676488_43678.png)
  • spring-boot 启动失败

    千次阅读 2017-03-16 14:35:45
    简单写了个spring boot测试应用,起不来,报以下warn和一堆exception** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.最后发现是application类不能...
  • spring boot启动失败不输出日志

    千次阅读 2020-03-14 15:01:03
    spring boot启动失败,没有任何错误日志输出,只输出了如下信息: 可能的原因: 1、日志配置文件没有配好 解决:修改日志等级,找到logback-boot.xml文件,找到<root level="INFO"> </root>,修改日志...
  • Sping Boot注入接口失败

    2018-04-21 06:28:21
    !...项目结构应该是正确的。 ``` @Repository public interface UserDao { public User getById...启动spring boot后会提示dao层没有扫描到,如果@ComponentScan dao层的话,会提示service层注入失败,求解。
  • android BOOT_COMPLETED 失败

    千次阅读 2013-06-18 14:25:49
    From: http://www.trinea.cn/android/android-boot_completed-not-work/comment-page-1/#comment-122...本文主要介绍Android应用如何开机自启动、自启动失败的原因、adb命令发送BOOT_COMPLETED。 问题:应用程序是否可
  • 基于各种原因吧,使用Spring Initializr创建Spring Boot项目时,使用默认的网址https://start.spring.io/会存在超时、连接失败、创建速度慢等问题,使用阿里的地址替换就可了。 阿里地址:...
  • bootcamp分区_BOOTCAMP 删除分区失败

    千次阅读 2018-10-31 09:30:00
    mac 装了双系统,Mac OS X 分配的内存太少了,导致使用卡顿,要删掉windows系统。 在删除windows的时候出现 ...3.重新进入系统后,打开bootcamp助手,删除windows系统。   此随笔乃本人学习工作记录,如有疑问欢迎...
  • pom.xml:spring-boot-starter-amqp 加载失败问题 spring-boot-starter-amqp 飘红报错 在学习rabbitmq时,pom.xm导入以下依赖时报错: <dependency> <groupId>org.springframework.boot</groupId&...
  • 在飞思卡尔的P2020上移植bootrom,从nor flash的0地址开始烧写,bootrom启动失败了,串口没有任何打印。 然后用逻辑分析仪查看,发现从flash的0xFFFFC开始执行指令,只执行了一条指令(BL)和数据,就停止了。 是我...
  • 主要原因是启动时提示在加载dataSourcedefined in class path resource org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class时失败。 该项目是一个网关项目,只配置了一个redis数据...
  • 出于某些原因需要在 mac 上装个 Windows,很自然地就会想到用 Boot Camp 安装。...Boot Camp 安装失败: 拷贝 Windows 文件时出错 一番 Google ,才发现这个问题居然是由于下载的 windows 镜像超过了 4 ...
  • 保证上述url是正确的、网络畅通,甚至可以通过浏览器访问到该地址,仍出现(下图为网络图片) 检查防火墙是否禁止IDEA通过。
  • spring boot 读取.yml失败

    2018-07-23 09:40:43
    1、application.yml ``` ... <artifactId>spring-boot-configuration-processor <optional>true ``` 代码如上,我在获取dataSourceProperties得到的是null,请问各位大神是哪里写的不对呢?谢谢
  • 之前网上买了个STM32的最小系统开发板,由于最近换了笔记本,为了测试重新搭建的开发环境是否能用,用st-link v2烧写这块开发板,发现居然...上网查了下,有人说到买的一个开发板有类似的情况,客服让他把BOOT0短...
  • Spring Boot教程(十三):Spring Boot文件上传

    万次阅读 多人点赞 2018-05-15 15:55:31
    一、创建一个简单的包含WEB依赖的SpringBoot项目 pom.xml内容: &lt;!-- Spring Boot web启动器 --&gt; &lt;dependency&...org.springframework.boot&...spring-boot-starter-...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 137,137
精华内容 54,854
关键字:

下载boot失败