Windows10 下 SourceTreeSetup-3.2.6.exe 跳过注册 Bitbucket

本文详细介绍了如何安装和配置SourceTree,包括安装Git、设置accounts.json文件、修改user.config文件以及选择不安装Mercurial的过程。

0. 安装 Git

1. 下载并执行SourceTreeSetup-3.2.6.exe,会进入以下界面。

在这里插入图片描述

2. 关闭这个界面。

3. C:\Users\young\AppData\Local\Atlassian\SourceTree 添加accounts.json 文件

C:\Users\young\AppData\Local\Atlassian\SourceTree
young 为用户名。换成自己的。

accounts.json 文件如下:

[
  {
    "$id": "1",
    "$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity",
    "Authenticate": true,
    "HostInstance": {
      "$id": "2",
      "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount",
      "Host": {
        "$id": "3",
        "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountHost, SourceTree.Host.AtlassianAccount",
        "Id": "atlassian account"
      },
      "BaseUrl": "https://id.atlassian.com/"
    },
    "Credentials": {
      "$id": "4",
      "$type": "SourceTree.Model.BasicAuthCredentials, SourceTree.Api.Account",
      "Username": "",
      "Email": null
    },
    "IsDefault": false
  }
]

4. C:\Users\young\AppData\Local\Atlassian\SourceTree.exe_Url_n222km3wptgdvxwmgelnuodyl5shfgjb\3.2.6.3544 修改 user.config

configuration userSettings SourceTree.Properties.Settings 之下添加以下 6 行内容

 <setting name="AgreedToEULA" serializeAs="String">
        <value>True</value>
</setting>
<setting name="AgreedToEULAVersion" serializeAs="String">
        <value>20160201</value>
</setting>

5. 重新点击安装 SourceTreeSetup-3.2.6.exe

6. 不安装 Mercurial

org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn&#39;t supported yet: class path resource [java/lang/String.class]; nested exception is java.lang.IllegalArgumentException at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:56) ~[spring-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80) ~[spring-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102) ~[spring-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76) ~[spring-core-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.context.annotation.ConfigurationClassUtils.checkConfigurationClassCandidate(ConfigurationClassUtils.java:71) ~[spring-context-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:255) [spring-context-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:225) [spring-context-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630) [spring-context-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) [spring-context-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4059) [catalina.jar:9.0.107] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4501) [catalina.jar:9.0.107] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164) [catalina.jar:9.0.107] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599) [catalina.jar:9.0.107]
最新发布
07-19
### 3.1 问题分析 当Spring框架在解析Java类文件时出现 `org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn&#39;t supported yet` 错误,并伴随 `Unsupported class file major version` 的提示时,这表明Spring使用的ASM库无法解析当前类文件的版本。ASM是一个用于字节码操作的库,Spring依赖它来读取类文件以支持注解配置和组件扫描。 Java类文件的主版本号(major version)与JDK版本密切相关。例如,Java 17对应类文件主版本号61,Java 18对应62,依此类推。旧版本的Spring框架(如Spring 5.0及更早版本)内置的ASM库通常仅支持到Java 11(类文件主版本55),因此在尝试解析更高版本JDK编译的类文件时会失败。 此类问题通常出现在以下场景中: - 使用较新版本的JDK(如JDK 17、JDK 18)编译项目。 - Spring版本未更新至支持对应Java版本的版本(如Spring 5.2+支持Java 14,Spring 5.3+支持Java 17)[^2]。 --- ### 3.2 解决方案 #### 3.2.1 升级Spring框架版本 最直接的解决方法是将Spring框架升级到支持当前JDK版本的版本。例如: - 若使用JDK 17,应升级Spring至5.3.x或更高版本。 - 若使用JDK 18或19,建议使用Spring 5.3.20+或Spring 6.x。 Spring 5.3及以上版本内置了更新的ASM库(ASM 9.x),能够支持Java 17及更高版本的类文件格式。 #### 3.2.2 降级JDK版本 若因项目依赖或环境限制无法升级Spring版本,可考虑将JDK版本降级至Spring支持的范围。例如: - 使用JDK 11(类文件主版本55),以兼容Spring 5.2及更早版本。 - 确保编译时使用 `-target 11` 和 `-source 11` 参数,以生成兼容的类文件。 #### 3.2.3 使用自定义类解析器(高级) 对于某些特殊场景,可以通过自定义类加载器或替换ASM库版本来实现兼容性支持。例如,将Spring依赖的ASM库手动替换为更新版本(如ASM 9.x),并确保其在类路径中优先加载。 --- ### 3.3 示例配置 #### 更新Spring Boot版本(Maven示例) ```xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.0</version> <relativePath/> </parent> ``` 此配置适用于使用Spring Boot的项目,并确保Spring版本支持JDK 17。 --- ###
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值