Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

访问根路径显示hello word #107

Open
clearPeople13 opened this issue Nov 8, 2023 · 2 comments
Open

访问根路径显示hello word #107

clearPeople13 opened this issue Nov 8, 2023 · 2 comments

Comments

@clearPeople13
Copy link

当前使用版本(必填,否则不予处理)

最新版本2.0.5
<mybatis-plus-generator.version>2.0.5</mybatis-plus-generator.version>
<mybatis-plus.version>3.5.1</mybatis-plus.version>
<mysql.version>8.0.33</mysql.version>
`package com.example;

import com.github.davidfantasy.mybatisplus.generatorui.mbp.NameConverter;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import com.github.davidfantasy.mybatisplus.generatorui.GeneratorConfig;
import com.github.davidfantasy.mybatisplus.generatorui.MybatisPlusToolsApplication;
@SpringBootTest
class DemoApplicationTests {

@Test
public static void main(String[] args) {
    GeneratorConfig config = GeneratorConfig.builder().jdbcUrl("jdbc:mysql://localhost:3306/gd")
            .userName("root")
            .password("root")
            .driverClassName("com.mysql.cj.jdbc.Driver")
            //数据库schema,MSSQL,PGSQL,ORACLE,DB2类型的数据库需要指定
            .schemaName("DB2")
            //数据库表前缀,生成entity名称时会去掉(v2.0.3新增)
            .tablePrefix("t_")
            //如果需要修改entity及其属性的命名规则,以及自定义各类生成文件的命名规则,可自定义一个NameConverter实例,覆盖相应的名称转换方法,详细可查看该接口的说明:
            .nameConverter(new NameConverter() {
                /**
                 * 自定义Service类文件的名称规则,entityName是NameConverter.entityNameConvert处理表名后的返回结果,如有特别的需求可以自定义实现
                 */
                @Override
                public String serviceNameConvert(String entityName) {
                    return entityName + "Service";
                }

                /**
                 * 自定义Controller类文件的名称规则
                 */
                @Override
                public String controllerNameConvert(String entityName) {
                    return entityName + "Action";
                }
            })
            //所有生成的java文件的父包名,后续也可单独在界面上设置
            .basePackage("com.github.davidfantasy.mybatisplustools.example")
            .port(8068)
            .build();
    MybatisPlusToolsApplication.run(config);
}

}
`

该问题是如何引起的?(确定最新版也有问题再提!!!)

就正常启动,
image

image

重现步骤(如果有就写完整)

报错信息

没有报错
咋都没有人出现这些的问题
我这样有什么大问题,第一步跨不出去

@RenDav
Copy link

RenDav commented Dec 20, 2023

我也遇到了一样的问题

@lyhxiangyang
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants