小编Dav*_*ohn的帖子

在光滑,scala中处理Postgres json数据类型

我的架构中有一个Postgres'json'列.这是我的代码中的列映射:

def my_col = column[Option[String]]("my_col")
Run Code Online (Sandbox Code Playgroud)

哪个不起作用,插入时得到的堆栈跟踪说:

列"my_col"的类型为json,但表达式的类型为字符变化

我也试过这个:

def my_col = column[Option[String]]("my_col", O.SqlType("json"))
Run Code Online (Sandbox Code Playgroud)

这也产生相同的错误.

postgresql scala sqldatatypes slick

6
推荐指数
2
解决办法
4022
查看次数

当我的属性文件具有自定义名称时,如何添加配置文件特定的属性文件

我的项目的src/main/resources文件夹中有名称为:transactionexpiry.properties的属性文件.

我可以使用@PropertySource("classpath:/transactionexpiry.properties")读取代码中的属性

现在我不想添加应用程序范围并添加特定于环境的配置文件作为transactionexpiry-dev.properties,transactionexpiry-local.properties

但是同样适用于application.properties,application-dev.properties,application-local.properties

有没有办法让它与我以前的设置一起工作?

spring spring-boot

1
推荐指数
1
解决办法
459
查看次数

标签 统计

postgresql ×1

scala ×1

slick ×1

spring ×1

spring-boot ×1

sqldatatypes ×1